Adding new user 'myadmin'(1010) with group myadmin ... #并把用户myadmin添加到myadmin组 Creating home directory '/home/myadmin' ... #在/home下创建这个用户的目录 Copying files from '/etc/skel' ... #拷贝/etc/skel目录下的隐藏配置文件到/home/myadmin Enter newUNIXpassword: #输入新密码 ...
done (3)执行该脚本文件,查看执行过程 root@liu:/home/liu/Desktop/Dos# sh t.sh `cat <username.txt`/home/student/stu1 Adding user `stu1'...Addingnewgroup `stu1'(1002) ...Addingnewuser `stu1'(1001) with group `stu1'... Creating home directory `/home/student/stu1'...Copying filesfr...
Adding user `stu1' ... Adding new group `stu1' (1002) ... Adding new user `stu1' (1001) with group `stu1' ... Creating home directory `/home/student/stu1' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated suc...
Adding new user `john' (1001) with group `john' ... Creating home directory `/home/john' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for john Enter the new value, or ...
root@liu:/home/liu/Desktop/Dos# sh t.sh `cat < username.txt` /home/student/stu1 Adding user `stu1' ... Adding new group `stu1' (1002) ... Adding new user `stu1' (1001) with group `stu1' ... Creating home directory `/home/student/stu1' ... ...
root@liu:/home/liu/Desktop/Dos# sh t.sh `cat <username.txt`/home/student/stu1 Adding user `stu1'...Addingnewgroup `stu1'(1002) ...Addingnewuser `stu1'(1001) with group `stu1'... Creating home directory `/home/student/stu1'...Copying filesfrom`/etc/skel'...EnternewUNIX passwor...
-m, --move-home move contents of the home directory to the new location (use only with -d) -o, --non-unique allow using duplicate (non-unique) UID -p, --password PASSWORD use encrypted password for the new password -s, --shell SHELL new login shell for the user account ...
UID and GID values, creating a home directory with skeletal configuration, running a custom script, and other features. adduser and addgroup can be run in one of five modes: 可以看出adduser的参数更全面,更好用。 顺便提一下,如果想为一个系统服务创建专门的用户,比如说为hadoop服务创建一个专门的...
Adding new user `cxxu_kali' (1000) with group `cxxu_kali'... Creating home directory`/home/cxxu_kali' ... Copying files from `/etc/skel'... New password: Retype new password: passwd: password updated successfully Changing the user information for cxxu_kali ...
Adding new user `arron' (1002) with group `arron' ... Creating home directory `/home/arron' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for arron Enter the new value, or ...