This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

修性不修命,萬劫陰靈難入聖; 修命不修性,猶有家財無主柄
Album | Blog | Comment | Profile | Control Panel
aquatower | 9 August,2009 13:39
Bookmark: HemiDemi MyShare Baidu Google Bookmarks Yahoo! My Web Del.icio.us Digg technorati furl Bookmark to:YouPush Bookmark to:你推我報

User Administration

%user's home directories get populated with the files from "/etc/skel/*"


1. Command:
(1)user administration

#useradd [options] username

#passwd username

#chgr groupname filename

#usermod [options] username
Options:
-L : lock the password
-U: unlock the password
-G group : append the user to the specified groups
-d home_dir : change the home directory
-e expire_date : set date which the account will expire and be disabled

#userdel [-r] username
-r : deletes the user's home directory

#chage [options] username
Options:
-m : minimum days between password changes
-M : maximum days between password changes
-E date : expier the account on this date(YYYY-MM-DD format)
-l : list the settings

(2)group administration

#groupadd groupname

#groupdel groupname

#groupmod [options] groupname
#groupmod -n newname oldname
Ex:
#groupmod -n staff employee

2. Switching Accounts

#su - [user]
#su - [user] -c command

3.Suid, Sgid, Sticky bit

#chmod u+s filename

#chmod g+s filename
#chmod g+s directory
#chmod 2770 directory

#chmod o+t /home/share
#chmod 1777 /home/share



Comment

Trackback

Comment Permissions: Only members may comment. If you are not a PIXNET member, click here to sign up.