账号与群组和/etc/passwd、/etc/shadow、/etc/group、/etc/gshadow有关
(1)建立所需要的群组:vi /etc/group
(2)将/etc/group与/etc/gshadow同步:grpconv
(3)建立账号的各个属性:vi /etc/passwd
(4)将/etc/passwd与/etc/shadow同步:pwconv
(5)建立该账号的密码:passwd accountname
(6)建立家目录:cp -a /etc/skel /home/accountname
(7)更改用户家目录的属性:
chown -R accountname.group /home/accountname
chmod 700 /home/accountname
(1)建立所需要的群组:vi /etc/group
(2)建立账号的各个属性:vi /etc/passwd
(3)openssl passwd -1 -salt ‘12345678‘
(4)vim /etc/shadow 将上面创建的加密密码添加进去
(5)建立家目录:cp -a /etc/skel /home/accountname
(6)更改用户家目录的属性:
chown -R accountname.group /home/accountname
chmod 700 /home/accountname
原文地址:http://blog.51cto.com/runcx/2105524