You are on page 1of 5

Lab Work 7

CS 470

a) Used commands useradd –u and useradd –g. it get ID 1001 because 1000
was already deserved with my user.

b) To see a list of users of the system we should get access on /etc/passwd.


These foul line actually shows the details of the given users.
Login name, encrypted password placeholder, UID, Default GID number,
optional information, home directory, login shell.

c) Passwd file is differ from shadow file as passwd is readable and shadow
isn’t. but with some action we also can get access on shadow file too.

d) These three line shows details from /etc/group file which are group name,
encrypted password placeholder, GID group list.
e) These are fragments from /etc/group and /etc/shadow files. In shadow file
we can see that password is not assigned yet.

With command passwd –S test we get information about password. In this case it shows us that it is
locked as it is not assigned yet.

f) tt passwd –aS command not found.

g) Set password to the user test, using the passwd command.

h) Remove password and test it.


i) Set password again and set expiration date.

j) !! means that password is locked


shadow

passwd

k) Unlock password and test it

l) To disable account after password expiration should use passwd –i


command.
m) Set expiration time 90 days.

n) Set warning time 14 days.

o)

p) Add new user johndoefoo

q)
s)

v)

w)

You might also like