adduser
# adduser //先鍵入adduser指令
Use option ``-silent'' if you don't want to see all warnings and questions.
Check /etc/shells
Check /etc/master.passwd
Check /etc/group
Enter your default shell: csh date no sh tcsh [sh]: // 這是要使用哪個shell
會列出/etc/shells裡面有的shell
Your default shell is: sh -> /bin/sh //設定sh的目錄
會列出該shell的位置
Enter your default HOME partition: [/home]:
Copy dotfiles from: /usr/share/skel no [/usr/share/skel]:
Send message from file: /etc/adduser.message no
[/etc/adduser.message]:
Use passwords (y/n) [y]: y / /是否要使用密碼
--------------------------------------------------------------------------------
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_-]: test //在這輸入使用者名稱
Enter full name []: test //輸入使用者全名
Enter shell csh date no sh tcsh [sh]:
Enter home directory (full path) [/home/test]: //設定要給使用者的目錄
Uid [1000]: //設定使用者id
Enter login class: default []:
Login group test [test]: //輸入使用者的群組
Login group is ``test''. Invite test into other groups: guest no [no]:
//是否要再加入其他群組
Enter password []: //輸入密碼
Enter password again []: //再次確認密碼
Name: test
Password: ****
Fullname: test
Uid: 1000
Gid: 1000 (test)
Class:
Groups: test
HOME: /home/test
Shell: /bin/sh
OK? (y/n) [y]: y //檢查上面資料確定是否要新增
Added user ``test''
Send message to ``test'' and: no root second_mail_address [no]: y
test,
your account ``test'' was created.
Have fun!
See also chpass(1), finger(1), passwd(1)
Add anything to default message (y/n) [n]: n
Send message (y/n) [y]:
Copy files from /usr/share/skel to /home/test
y... User unknown
Add another user? (y/n) [y]: n //是否要新增其他使用者
Goodbye!
--
「如果你真想去做,你會找到一個方法 ;如果你不想去做,你會找到一個藉口。」
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 202.178.141.137
※ 編輯: MayDayLove 來自: 202.178.141.137 (05/23 01:18)
※ 編輯: MayDayLove 來自: 202.178.141.137 (05/23 01:19)
※ 編輯: MayDayLove 來自: 202.178.141.167 (05/26 22:43)
※ 編輯: MayDayLove 來自: 202.178.141.167 (05/26 23:55)
1.新增使用者:
指令: