0% found this document useful (0 votes)
4 views

Assignment 1 ~ Linux Administration ~

The assignment involves creating and managing tarballs of the /home directory using gzip and bzip2, modifying file permissions with chmod, and creating and managing a user account with useradd. Additionally, there are oral questions covering various Linux commands and concepts related to file permissions and user management. The assignment tests practical skills in Linux administration and understanding of command functionalities.

Uploaded by

UzumakiGouyo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Assignment 1 ~ Linux Administration ~

The assignment involves creating and managing tarballs of the /home directory using gzip and bzip2, modifying file permissions with chmod, and creating and managing a user account with useradd. Additionally, there are oral questions covering various Linux commands and concepts related to file permissions and user management. The assignment tests practical skills in Linux administration and understanding of command functionalities.

Uploaded by

UzumakiGouyo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment 1 ~ Linux Administration ~

Teacher: Anarbayeva Dana

1. Create a tarball called home.tar.gz of the /home directory under /tmp and
compress it with gzip. You will create another tarball called home.tar.bz2 of
the /home directory under /tmp and compress it with bzip2. You will list the
content of home.tar.gz without uncompressing it and then extract all the files
in the current directory. Finally, you will extract the bzip2-compressed
archive in the /tmp directory.

2. A file called permfile2 exists with read permission for the owner (user1),
owning group (user1), and others, as shown below.

If the permissions vary, bring them to the desired state by executing chmod
444 permfile2 prior to starting the exercise. In this exercise, you will add an
execute bit for the owner and a write permission bit for the group and public.
You will then revoke the write bit from the public and assign read, write, and
execute permissions to the three user categories at the same time. The chmod
command accepts the -v flag to display what it has changed. You may
alternatively view the long listing after each command execution for
verification.

3. Create a user account user2 using the defaults defined in the useradd and
login.defs files. You will assign this user a password and show the new line
entries from all four authentication files.
Modify certain attributes for user2 and then delete it.
You will change the login name to user2new, UID to 2000, home directory
to /home/user2new, and login shell to /sbin/nologin. You will display the line
entry for user2new from the passwd file for validation. Finally, you will
remove this user and confirm the deletion.
Oral questions:

● What is the function of the tac command?


● Which vim mode allows to execute advanced copy and move
functions?
● A file compressed with bzip2 can be uncompressed with the gunzip
● command. True or False? Why?
● What would the command tar pczf output.file /usr/local do if it is
● executed by a normal user?
● What would the command wc -c file1 show?
● The tail command can be used to view a file while it is being updated.
True or False?
● Name the permission classes, types, and modes.
● What would the command chmod g-s file1 do?
● Name the four local user authentication files
● What would the command useradd -D do?
● What information does the lastb command provide?
● UID 999 is reserved for normal users. True or False?

You might also like