Wednesday, February 4, 2009


基於安全考量,除非有特殊設定, root 這個帳號是不能直接遠端 telnet 進 FreeBSD 的必須先用一般帳號 telnet ,login 後再執行 su 這個指令來取得 root 的權限 而想要 su 成 root 則該帳號必須是 wheel 這個群組的成員, 所以我們要新增一個帳號,並之加入 wheel 的群組中

root@www [/root] # adduser
/etc/adduser.conf: No such file or directory
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]: tcsh
Your default shell is: tcsh -> /bin/tcsh
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 Enter
[/etc/adduser.message]: Enter
Use passwords (y/n) [y]: Enter

Write your configuration to /etc/adduser.conf? (y/n) [y]:

Ok, let's go.
Don't worry about mistakes. I will give you the chance later to correct any inpu
Enter username [a-z0-9_-]: admin
Enter full name []: System Administrator
Enter shell csh date no sh tcsh [tcsh]: Enter
Enter home directory (full path) [/home/admin]: Enter
Uid [1001]: Enter
Enter login class: default []: Enter
Login group admin [admin]: Enter
Login group is ``admin''. Invite admin into other groups: guest no
[no]: wheel
Enter password []:
Enter password again []:

Name: admin
Password: ****
Fullname: System Administrator
Uid: 1001
Uid: 1001
Gid: 1000 (admin)
Groups: admin wheel
HOME: /home/admin
Shell: /bin/tcsh
OK? (y/n) [y]: y
Added user ``admin''
Send message to ``admin'' and: no root second_mail_address
[no]: n

System Administrator,

your account ``admin'' 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]: n
Copy files from /usr/share/skel to /home/admin
Add another user? (y/n) [y]: n

No comments: