0% found this document useful (0 votes)
9 views14 pages

Expt 3

Digital duo

Uploaded by

Ahsan S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

Expt 3

Digital duo

Uploaded by

Ahsan S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Experiment no.

:03

Date:

AUTHENTICATION AND
AUTHORISATION IN LINUX SERVER.

Aim: To familiarise the commands for Authentication and Authorisation in


Linux server.

Procedure:
1) List all the users in the system.
Command for list all users

 #cat /etc/passwd

Other commands used to list all users.


• #getent passwd

• #cat /etc/shadow-(encrypted password)

2) List all the group in the system.


Commands for list all users.

 #cat /etc/group

Another command to list all group.


• #getent group

3) Find details of login users.


Command to get details of login users

 #pinky -(provide more information.)

Other commands used to list all users.


• #who –(list all logged in users.)
• #w –(provide wide information.)
• #whoami –(showing which user is.)
4) Create 5 groups.
Command for create group.

 #groupadd groupname.

2) Create 6 users (3 each using both commands)


Commands for create users

 #adduser user11 –( ask for password and other informations)


Other commands used to list all users.

• #sudo useradd username –(a new group with same name will
created)
• #useradd -G groupname username
• #useradd -G grp1.,grp2,grp3 username

3) Change password of all users.


Command for chage password.

 #passwd username –(chage user password and set password)

4) Assign each users to any two groups.


Command to assign users to group.

 #usermod -a -G group1 group2 group3 username


(Add user to multiple group) .
5) Change primary group of any two users.
Command to change primary group of any two users

 #usermod -g group username –(lowercase g for assign


primary group)
6) Create additional two users.
Command to create users

 #sudo useradd username -(Adding new user)


7) Create additional two groups.
Command to create groups.

 #groupadd groupname. -(adding new group)


8) Remove new user.
Command to remove user.

 #userdel username. –(remove user)


9) Remove new group.
Command for remove group

 #groupdel groupname. –(remove group)


10) Create 5 directories in user home directory.
Commands create directory.

 #Mkdir –(to make directory)

11) Create 6 files in each directory.


Command to create file

 #touch filename –(to create empty file) .


12) Grand read/write/execute permission to 2 users on all
directories and files.
Command to grand permission.

 #Chmod 777 filename. –(read write and execute permission ).

13) Grand read/write permission on all files of any two directory to


all users.
Commands.

 #chmod 660 filename –(read write permission) .


Result: familiarised Authentication and Authorisation successfully.

You might also like