Assignment 1 ~ Linux Administration ~
Assignment 1 ~ Linux Administration ~
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: