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

LAB 05 Unix Administration

This document provides instructions for a UNIX administration lab involving user account management. It instructs the student to: 1. Create, modify, and delete a user account without using commands like useradd, instead manually editing files like /etc/passwd and /etc/shadow. 2. Create new groups called "pmaster" and "pmember", add users to each, and set permissions on a test directory and file so different groups have different access levels. 3. Review a lecture on file permissions and practice creating, deleting, and changing permissions for different types of files and directories using commands like chmod and understanding how umask works. The vi text editor is recommended.

Uploaded by

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

LAB 05 Unix Administration

This document provides instructions for a UNIX administration lab involving user account management. It instructs the student to: 1. Create, modify, and delete a user account without using commands like useradd, instead manually editing files like /etc/passwd and /etc/shadow. 2. Create new groups called "pmaster" and "pmember", add users to each, and set permissions on a test directory and file so different groups have different access levels. 3. Review a lecture on file permissions and practice creating, deleting, and changing permissions for different types of files and directories using commands like chmod and understanding how umask works. The vi text editor is recommended.

Uploaded by

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

LABORATORY 5 UNIX ADMINISTRATION

1. Different versions of unix and linux have different account


management programs with different capabilities. To fully control
the account management process, it's worth knowing how to create,
modify and securely delete a user account using only a text editor
and basic unix commands.

Your task is to create, modify and then delete the user account
without using the useradd, usermod or userdel commands, making
sure at all stages that the operation has been carried out
correctly. Be extremely careful when modifying /etc/passwd and
/etc/shadow files. Alway make backup copy of files before
modification. It is safer to use text editor rather than "echo >>"
command. And NEVER EVER use "echo >" - you may destroy your
machine !!!
Using a text editor, modify the selected user parameters (shell, UID,
GID, home directory, etc.) Check the effects. Modify the password age
information to force the user to change the password immediately.
Modify the expiry so that the user cannot log in.

Modiying the group and the user.


Delete the user account by deleting the associated entries in the
passwd, shadow and group files. Delete user directory. Use the find
command to make sure that no files belonging to this user remain on
the system. What parameter should you use to find files that belong
to a user who has already been removed from the system?

2. create a new group called pmaster with GID = 500 and pmember with
GID = 501. Add one user to both groups and another user only to the
pmember group. Create the /export/home/project directory and create
a text file in it. Set the directory and file group so that users
belonging to the pmaster group can create and modify files in the
project directory, members of the pmember group only read the contents
of files, while other users cannot access the files but can see their
names.
3. Review lecture 5:
https://iris.ics.agh.edu.pl/rs/unix/L03_File.htm
Follow all the examples in this chapter (in Courier font). Make
sure you can efficiently create and delete directories and files
of various types, and change their user, group and access rights.
Make sure you can apply the proper access rights to objects and
understand how umask works. After these classes, you should also
use the system file editor efficiently. The vi editor is
recommended and is available on all UNIX and Linux systems. If you
want you can use the nano editor - in this case find its description
in the literature.

You might also like