Problem
linux中添加用户:
sudo groupadd tomcat
sudo mkdir /opt/tomcat
sudo useradd -s /bin/nologin -g tomcat -d /opt/tomcat tomcat`--没有erroe||warning,安排上了~~
出现警告:useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
出现同样问题的兄台?
解决方法:???
Analysis
之前参考的文章有毒,useradd -d命令本身就创建目录,所以没必要mkdir.自己挖坑自己挑啊····
If the directory didn’t exist , the Linux useradd process creates the directory and copies the skel files : .kshrc , .bashrc , .bash_profile and .bash_logout files into the user dir