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 14:08
Bookmark: HemiDemi MyShare Baidu Google Bookmarks Yahoo! My Web Del.icio.us Digg technorati furl Bookmark to:YouPush Bookmark to:你推我報

LAB

1.create accounts
for user in joshua alex dax
do
useradd $user
echo 'passowrd' |passwd --stdin $user
done

2. create groups
#groupadd -g 2000 sales
#groupadd -g 2001 hr
#groupadd -g 2002 web


3. set user to group
#usermod -G sales joshua
#usermod -G hr alex
#usermod -G web dax

(#vi /etc/group, 也可以加入groups)

4. create a directory /depts/{hr,web,sales}
#mkdir -p /depts/{sales,hr,web}

for group in sales hr web
do
chgrp $group /depts/$group
done

5 set Sgid fro /depts
#chmod 770 /depts/*
#chmod g+s /detps/*


Comment

Trackback

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