[下一頁][首頁][上一頁]

我該如何增加一個使用者?

NAME
     adduser - 新增使用者指令
DESCRIPTION
     adduser 新增使用者的小程式。它會至 passwd/group 檔案中加入相關
     資料,建立使用者目錄、dotfiles,並送出 welcome 訊息給使用者。 
RESTRICTION
     username
             Login 的名字。包括小寫字母或數字。最長為 8 個字元。由於的歷史
             包袱,使得位元長度限制在 8 個位元。
     fullname
             姓氏與名字,這裡不允許使用 ':' 字元。
      
注意: 當你在 wheel group 中增加使用者時,他將可以執行 su 指令,而且不須要先 exit 就可以直接登入為 root 或其它使用 者。
 
範例:
# adduser
如果你不想看到所有的警告和問題,你可以使用 ``-silent'' 選項。

Check /etc/shells
Check /etc/master.passwd
Check /etc/group
Enter your default shell: bash csh date no sh [sh]: ...按 ENTER...
Your default shell is: sh -> /bin/sh
Enter your default HOME partition: [/home]: ...按 ENTER...
Copy dotfiles from: /usr/share/skel no [/usr/share/skel]: ...按 ENTER...
Send message from file: /etc/adduser.message no [no]: ...按 ENTER...
Do not send message
Use passwords (y/n) [y]: ...按 ENTER...

Ok, let's go.
Don't worry about mistakes. I will give you the chance later to correct any input.
Enter username [a-z0-9_-]: elvis
Enter full name []: Elvis Graton
Enter shell csh date no sh [sh]: ...按 ENTER...
Enter home directory (full path) [/home/elvis]: ...按 ENTER...
Uid [1004]: ...按 ENTER...
Enter login class: default []: ...按 ENTER...
Login group elvis [elvis]: ...按 ENTER...
Login group is ``elvis''. Invite elvis into other groups: guest no 
[no]: wheel ...邀請他加入 wheel 群組,如可他是您的 user...
Enter password []: ...不回應,混合大寫字母與數字...
Enter password again []: ...不回應,再鍵入一次...
Name:     elvis
Password: ****
Fullname: elvis
Uid:      1004
Gid:      1004 (elvis)
Class:    
Groups:   elvis 
HOME:     /home/elvis
Shell:    /bin/sh
OK? (y/n) [y]: ...按 ENTER...
Added user ``elvis''
Copy files from /usr/share/skel to /home/elvis
Add another user? (y/n) [y]: n
Goodbye!
# _
[上一頁][首頁][下一頁]