Chapter 3: Basic Linux Administration
for user in Lisa John Karel Carola; useradd $user; done
.- Execute
passwd <user>
and enterwelc0meITG
and it will ask you to enter the password again to confirm, so enterwelc0meITG
again. getent<user>
.groupadd finance;
groupadd staff
.groupmems -g <group_name> -a <user_name>
; alternatively,usermod –a –G <group_name> <user_name>
.- To create the directory and set group ownership, execute the following:
mkdir /home/staff chown staff /home/staff chgrp staff /home/staff
Similarly, for
finance
, execute these commands:mkdir /home/finance chown finance /home/finance chgrp finance /home/finance
chmod –R g+r /home/finance
.- The default get access control list (
getfacl -d
) will list the ACL of a user.