You are on page 1of 5

CSE208 – Operating System D23DCS147-RAJ

Faculty of Technology and Engineering


DEPSTAR
Department of Computer Science & Engineering

Date: / /
Practical 2

Academic Year : 2023-24 Semester : 4th


Course code : CSE208 Course name : Operating System

Aim: Managing Users and Groups in Linux.

1.Create, delete and manage groups.

sudo useradd user-name:


It will create a new user

sudo groupadd group-name :


It will create a new group.

Page 2 of 3
CSE208 – Operating System D23DCS147-RAJ
sudo usermod -a -G groupname username :
It will add the user in respective group.

2. Manage Directory and File Permissions in linux

chown :
It will change the owner and group of files or directory.D:\demo

chmod :
It will change the permission of the file or directory.

setfacl :
It will set the ACL(access control list) for a file or directory.

Page 2 of 3
CSE208 – Operating System D23DCS147-RAJ
getfacl : It is used to get the ACL(access control list) for a file or directory .

3.Add users in bulk in linux

Touch opt/user add:


The touch command is used to create a new empty file or update the access and modification
times
of an existing file.
Vim /opt/user add:
Vim is a powerful text editor used in Unix-based systems. When you execute this command, Vim
opens the file in its interface, allowing you to view and edit its contents.
Cat opt/user add:
The cat command is used to concatenate and display the contents of files.

Grade/Marks Sign of Lab Teacher with Date


( / 10)

Page 2 of 3
CSE208 – Operating System D23DCS147-RAJ

Page 2 of 3
CSE208 – Operating System D23DCS147-RAJ

Page 2 of 3

You might also like