Академический Документы
Профессиональный Документы
Культура Документы
Rinchending, Phuentsholing.
System Administration
Date: 08/03/2020
1
Aim: Login/Logout, I/O Indirection, User Management
1. Login with your credential (normal user credential) to GNOME Desktop and open Terminal.
Execute su command to switch to the privileged root. Identify the symbols in the shell for
both normal user and root user.
2. Login to the virtual console (Ctrl+Alt+F2) with normal user(i.e login with student id) and
virtual terminal (Ctrl+Alt+F3) with root user. Perform the following and reflect the
observation:
a. From normal user console, type mail -s Hi root < . and explain what does this
command do?
b. Switch to another console with root user and type mail command. Verify whether
mail is received from user or not and check mail. Write your observation.
c. Switch to GNOME Desktop (Ctrl+Alt+F1) and create directory Lab02 in the user
home directory. Create a file “Cat_file” in Lab01 directory using cat command and
make three lines file as Line1 Text, Line2 Text, Line 3 Text. Specify which
redirection operator is used? Write down its functionality.
d. Create another (output.txt) from Cat_file and copy its content by using STDOUT
operator.
Answer:
2
e. Create a file with three lines content as Line 4, Line 5, Line 6 using gedit editor.
Append this file content to output.txt using “>>” symbol and display the file content.
Write your observation.
Answer: its append the cat file line to cat_file
Append output to a file.
3. What are the commands used to see the usage of passwd and useradd commands? Write down
commands and explain them.
Answer: commands used to see the usage of passwd -passwd --help
useradd commands –useradd –help
4. Create user001 account with its associate password and list down its UID and GID.
Answer:
3
b. What would be output generated with the command head -5 /etc/passwd and head -n
5 /etc/passwd ? Explain your observation.
Answer:
c. Explain the output generated by the command tail -5 /etc/passwd and fields
associated in /etc/passwd files.
Answer:
4
e. Find the total number of configuration files in /etc
7. Create user accounts of user002, user003, and user004. Record the primary group with IDs
and GECOS fields of user001, user002, user003, user004.
Answer:
8. Create Sales and Marketing group using groupadd command and assigned user001, user002
to Sales group by editing /etc/group file and user003, user004 to Marketing group by
appending to group in usermod command.
Answer:
5
9. List the password information about user001 using chage command and explain the
generated output.
Answer:
10. Create user005 with GECOS field “Block 1, Rinchending, 17541112” and account expiry on
2018-12-30. Allocate the /bin/bash shell to user at the time of creating an account.
Answer:
11. Change the group ID of Sales to GID 1100 using groupmod command and verify its changes
in /etc/group file.
Answer:
6
b. Switch to root console and unlock the locked user using the command passwd – u
user004 and login to the console terminal. This time you will be able to successfully
login. Why?
Answer:
Because we have unlocked from the root user