1. วิธีการ Adduser ใน FreeBSD ทดลอง adduser ชื่อ webmaster อยู่ใน group webmaster ในลักษณะนี้เป็น user ที่ดูแลเวปหลักของ host ครับ
net# adduser webmaster (พิมพ์)
Username: webmaster (พิมพ์)
Full name: webmaster (พิมพ์)
Uid (Leave empty for default): (enter)
Login group [webmaster]: (enter ถ้าอยู่ในกลุ่ม webmaster ถ้าอยู่กลุ่มอื่นก็ใส่ชื่อกลุ่มลงไป)
Login group is webmaster. Invite webmaster into other groups? []:(enter)
Login class [default]: (enter)
Shell (sh csh tcsh nologin) [sh]: (enter) (หรือ /usr/fales ถ้าไม่ต้องการให้ user login เข้าระบบได้)
Home directory [/home/webmaster]: /usr/local/www/data-dist (เป็นการสร้างไดเร็กทอรี่ของ user)
Use password-based authentication? [yes]: (enter)
Use an empty password? (yes/no) [no]: (enter)
Use a random password? (yes/no) [no]: (enter)
Enter password: (ใส่ password)
Enter password again: (ใส่ password อีกครั้งให้เหมือนกัน)
Lock out the account after creation? [no]: (enter)
Username : webmaster
Password : *****
Full Name : webmaster
Uid : 1003
Class :
Groups : webmaster
Home : /usr/local/www/data-dist
Shell : /bin/sh
Locked : no
OK? (yes/no): yes (ตอบ yes)
adduser: INFO: Successfully added (webmaster) to the user database.
Add another user? (yes/no): no (ตอบ yes ถ้าต้องการ adduser คนอื่นอีก ตอบ no ถ้าไม่ต้องการ)
Goodbye!




2. วิธีการ Adduser ใน FreeBSD ทดลอง adduser ชื่อ netty อยู่ใน group student เป็น user ทั่วๆ ไปครับ
net# adduser netty (พิมพ์)
Username: netty (พิมพ์)
Full name: netty (พิมพ์)
Uid (Leave empty for default): (enter)
Login group [netty]: (enter ถ้าอยู่ในกลุ่ม netty ถ้าอยู่กลุ่มอื่นก็ใส่ชื่อกลุ่มลงไป ในที่นี้เราจะใส่ student)
Login group is student. Invite webmaster into other groups? []:(ใส่ student อีกครั้ง)
Login class [default]: (enter)
Shell (sh csh tcsh nologin) [sh]: (enter)
Home directory [/home/netty]: ( enter เป็นการสร้างไดเร็กทอรี่ของ user อยู่ที่ /home/netty)
Use password-based authentication? [yes]: (enter)
Use an empty password? (yes/no) [no]: (enter)
Use a random password? (yes/no) [no]: (enter)
Enter password: (ใส่ password)
Enter password again: (ใส่ password อีกครั้งให้เหมือนกัน)
Lock out the account after creation? [no]: (enter)
Username : netty
Password : *****
Full Name : netty
Uid : 1003
Class :
Groups : netty
Home : /home/netty
Shell : /bin/sh
Locked : no
OK? (yes/no): yes (ตอบ yes)
adduser: INFO: Successfully added (webmaster) to the user database.
Add another user? (yes/no): no (ตอบ yes ถ้าต้องการ adduser คนอื่นอีก ตอบ no ถ้าไม่ต้องการ)
Goodbye!
net#
ต่อไปก็เป็นการสร้าง Directory เก็บเวปไซต์ของ netty ครับ
net# cd /home/
net# chmod 711 netty
net# cd netty
net# mkdir public_html
net# chmod 755 public_html
net# chown netty:student public_html


0 comments



Recommended Money Makers