13,420
edits
Changes
no edit summary
= INVESTIGATION 1: User/Group Management =
User account management is a very important operation that a Linux sysadmin does on a consistent basis. The sysadmin not only needs to add or remove user accounts by issuing commands, but may need to automate user account creations a large number (batch) of potential employees. There are many features with the Linux command to create new users including: specification of a home directory, type of shell used, name, password and time-limit (referred to as "aging") for a new user account. Remove Removing user accounts also have options such as removing the user account but keeping the home directory for reference or evidence of "wrong-doing"
In your ULI101 course, you learned to change permissions for directories and files relating to user, same group members and other group members. In this course, since you are the sysadmin with root privileges, you can create or remove groups as well as change the ownership of directories and files! We will now learn to perform key user account management operations in this section.
=== Part 1: Studying the /etc/passwd file ===
The '''/etc/passwd ''' file is a database that stores user accounts (both system and regular users). Since we will be learning to create, modify and remove users on our Linux system, we should study this file in order to understand how those user account management commands will affect this file.
:'''Perform the following steps:'''
# Launch your c7host and centos1 VMs.
In this section, we will now learn how to <u>properly</u> add user accounts, remove user accounts, and modify existing user account information.
:'''Perform the following steps:'''
# Remain in your '''centos1''' VM for this section.
In this section, we will learn how to create, remove and modify groups in our Linux VM. You learned in ULI101 how to change permissions with the '''chmod''' command, but you didn't have admin privileges to create groups to allow directory and regular file sharing. Since you now have admin privileges with your VM, you can now create groups, and add users to this group to allow file-sharing among users.
:'''Perform the following steps:'''
#Remain in your '''centos1''' VM for this section.
Although there is a command called: '''service''' that may appear to manager services on your Linux system, it is considered <u>'''deprecated'''</u> (i.e. "obsolete"). It has been replaced by using the [http://zenit.senecac.on.ca/wiki/index.php/Init_vs_systemd#systemd_Command_Usage systemctl] command.
:'''Perform the following steps:'''
#Launch and use your '''centos2''' VM for this part.
The Linux sysadmin can also change the run-level (or state) of a graphical Linux server to run in text-based mode and run the graphical mode by issuing a command when graphic mode is required. The run-level term is now deprecated in Fedora, and will likely be deprecated in RHEL/CentOS at some point as well, but for now this is what the industry is using.
:'''Perform the following steps:'''
#Perform this part in both your '''centos2''' and '''centos3''' VMs.
We will now use shell scripting to help automate the task for a Linux adminstrator to create regular user accounts.
:'''Perform the following steps:'''
#You will be using your '''c7host''' machine for this section.
{{Admon/important|Time for a new backup!|If you have successfully completed this lab, make a new backup of your virtual machines as well as your host machine.}}
:'''Perform the Following Steps:'''
# Make certain that your '''c7host''', '''centos1''' and '''centos2''' VMs are running.