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/*
Previous post in this category: [雜記]RHCE筆記整理-RH133-Unit6(1)
Next post in this category: [雜記]RHCE筆記整理-RH133-Unit8(1)
學習(2)
[雜記]RHCE筆記整理-考試綱要(2)












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