Professional Documents
Culture Documents
2. Create a file named file34 using vi editor and add the contents as following:
After this, store a command as content in this file to display the ACL of this file. Execute a command
used for writing or changing the acls of file34 using its configuration file. Execute a command to change
the permission to 7 for accessing the contents of file34 by user TOM.
Concept used:
1. Commands to create and manage users are as follows:
useradd: Using this command, we can add users to the linux operating system.
Syntax: $useradd name_of_user
su: It stands for super user.
Syntax: $su
userdel: The user will be deleted with userdel command.
Syntax: $userdel name_of_user
usermod: You can modify the properties of a user with the usermod command.
Syntax: $usermod
passwd: Passwords of users can be set with the passwd command. Users will have to provide
their old password before twice entering the new one.
Syntax: $passwd
2. Group Management Commands:
groupadd: Groups can be created with the groupadd command.
Syntax: groupadd GroupName
groups: A user can type the groups command to see a list of groups where the user belongs to.
Syntax: groups
groupmod: You can change the group name with the groupmod command.
Syntax: groupmod newname oldname
Groupdel: You can permanently remove a group with the groupdel command.
Syntax: groupdel GroupName
Steps:
Ans.1.
i. create a user tom with user id 2211
- useradd -u 2211 tom (figure-1)
ii. set password of user as “redhat”
- passwd tom (figure-2)
iii. checking “/etc/passwd”
- cd /etc/
- tail -5 passwd (figure-3)
Ans.2.
i. create file34 using vi command
-vi file34 (figure-6 and figure-7)
Results:
1.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
2.
Figure 6
Figure 7
Figure 8
Figure 9
Learning outcomes:
1. Creating and managing users.
2. Creating and managing groups.
3. Accessing configuration files.
4. ACL commands to access files permissions.