-s, --shell SHELL new login shell for the user account -u, --uid UID new UID for the user account -U, --unlock unlock the user account -Z, --selinux-user new SELinux user mapping for the user account 例1:修改用户zhangsan的主目录为/home/kkk,并手动创建/home/kkk目录。 [root@redha...
linux添加新用户使用 useradd ---create a new user or update default new user information 删除用户使用userdel ---delete a user account and related files useadd options: -c, --comment COMMENT set the GECOS field for the new user account -d, --home-dir HOME_DIR home directory for the new...
root@shirley-virtual-machine:/home# cat /etc/group root:x:0:user3 daemon:x:1: bin:x:2: s...
备注文字会保存在passwd的备注栏位中 -d, --home-dir HOME_DIR home directory of the new account // 指定用户的家目录。默认家目录为 /home/username -D, --defaults print or change default useradd configuration // -e, --expiredate EXPIRE_DATE expiration date of the new account // 指定用户到...
userdel - delete a user account and related files synopsis: userdel [options] LOGIN options: -r : 删除用户的同时删除用户的家目录,即--remove参数 1. 2. 3. 4. 5. 实例: [root@localhost ~]# userdel -r user3 1. e、id id命令查看用户相关信息。
-m, --move-home with -d 删除用户账户命令 userdel - delete a user account and related files -f, --force -r, --remove chage 命令 -d, --lastday LAST_DAY set date of last password change to LAST_DAY -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE ...
This example will remove the account ‘fred’and irreversibly delete all of the files in his home directory: userdel -r fred A user’shome directoryis the default directory they are placed in when logging in, which they have full permissions for, and where they should be storing all of the...
-r --remove:删除用户家目录和邮箱 查看用户相关的ID信息 id 命令可以查看用户的UID,GID等信息 id [OPTION]... [USER] 常见选项: -u 显示UID -g 显示GID -G 显示用户所属的组的ID -n 显示名称,需配合ugG使用 切换用户或以其它用户身份执行命令 ...
removing a user.# It should remove any at/cron/print jobs etc. owned by# the user to be removed (passed as the first argument).##USERDEL_CMD /usr/sbin/userdel_local## If useradd should create home directories for users by default# On RH systems, we do. This option is ORed with ...
-W, --del-subgids FIRST-LAST remove range of subordinate gids -Z, --selinux-user SEUSER new SELinux user mapping for the user account 试试手: usermod -d /home/z yuqing 把用户所在的主目录改为/home/z usermod -g yuqingwu yuqing ...