Practical No. Aim: Working With Users, Group and Permissions. 1) Useraddcommand To Create A New User
Practical No. Aim: Working With Users, Group and Permissions. 1) Useraddcommand To Create A New User
2) Create a user account to grant him the privilege of super user, as shown below:
3) Open the file /etc/sudoers and the following lines for smith:
Jagdish ALL = (ALL) ALL It is as shown below:
4) Run the command visudo:
#visudo
(5) Test the configuration by making smith to login and perform any administrative activity as shown
below:
(i) Add user Mayuresh using sudo:
(2) But when any local user tries to change the identity temporarily, redhatsystem asks for the password
as shown below:
The file / etc/passwd also shows the entry of the user asfollow:
5) Groupaddcommand to create a new group and gpasswd command to add members and
administrator in the group:
1) To add permission
‘+’ operator is used to add a permission on file as follows:
1) # Chmodg+wcommand is used to add write permission group owner
2) To remove permission
‘-’ operator is used to remove permission of files.
#Chmod u-x command will remove the execute permission of owner of test directory
3) To replace permission
‘=’ operator is used to replace the permission by old permission.
# Chmod o=rwcommand will replace the permission of others users byrwof abc.txt file.
i)Read-4
ii)Write-2
iii) Execute-1
7=4+2+1 read+write+execute
5=4+1 read+execute
0 No permission
Chmod 750 command is used to give permission to owner as read,write and execute for group
owner as read and execute and for others no permission .
Chmod 754 command is used to give permission to owner as read,write and execute for group
owner as read and execute and for others read permission .
7=4+2+1 read+write+execute
5=4+1 read+execute
4 read