【正文】
useradd內(nèi)容解釋 IT Education amp。 Training Date: 6 February 2022 ?/etc/ IT Education amp。 Training Date: 6 February 2022 ?/etc/skel/*是用戶家目錄建立時的參考目錄,新用戶的家目錄的各項數(shù)據(jù),都是由 /etc/skel所復(fù)制過去的。 IT Education amp。 Training Date: 6 February 2022 、設(shè)置密碼 ?命令格式: ?[root@lhb ~] passwd 用戶名 IT Education amp。 Training Date: 6 February 2022 例子 ? 例 1, root要幫 lhb修改密碼 ? [root@lhb ~] passwd lhb ? Changing password for user lhb. ? New UNIX password: ? BAD PASSWORD: it is too simplistic/systematic ? Retype new UNIX password: ? passwd: all authentication tokens updated successfully. IT Education amp。 Training Date: 6 February 2022 ?例 2: lhb要修改自己的密碼。 ? [lhb@lhb ~]$ passwd ? Changing password for user lhb. ? Changing password for lhb ? (current) UNIX password: ? New UNIX password:(密碼簡單的時候) ? BAD PASSWORD: it is too simplistic/systematic ? New UNIX password: ? Retype new UNIX password: ? passwd: all authentication tokens updated successfully. IT Education amp。 Training Date: 6 February 2022 、刪除用戶 ?命令格式 ? [root@lhb ~] userdel [r] 用戶名 ?r:連用用戶家目錄也一起刪了 IT Education amp。 Training Date: 6 February 2022 練習 ? 例 1,刪除 lhbtest2,連同家目錄也一起刪除。 ? [root@lhb ~] userdel r lhbtest2 ? [root@lhb ~] ls l /home ? 16 ? drwx 4 lhb lhb 4096 1116 19:18 lhb ? drwx 4 lhbtest lhbtest 4096 1129 20:42 lhbtest ? drwxrr 2 root root 4096 1116 16:56 root ? rwrr 1 root root 0 1116 16:52 testing IT Education amp。 Training Date: 6 February 2022 ?Thank you! ?謝謝! IT Education amp。 Training Date: 6 February 2022 ?Root用戶登錄 ?vi /etc/group ?:set nu 22g ?i鍵 users用戶組: lhb : wq! ?vi /etc/gshow