In this chapter, we will converse in feature about user administration in UNIX.
There are three types of accounts on a UNIX system −
This is also called super user and would have entire and logical control of the system. A super user can run any commands without any constraint. This user should be supposed as a system administrator.
System accounts are those required for the operation of system-specific mechanism for instance mail accounts and the sash accounts. These accounts are usually necessary for some specific function on your system, and any modification to them could negatively change the system.
User accounts offer interactive admission to the system for users and groups of users. Specific users are normally assigned to these accounts and usually have incomplete access to critical system files and directories.
UNIX supports a conception of Group Account which sensibly groups a number of accounts. Every account would be a part of another group account. A UNIX group plays essential role in handling file permissions and development administration.
There are four most important user management files −
Check all the above files using the cat command.
The following table lists out commands that are accessible on common of UNIX systems to make and manage accounts and groups −
|S.No.||Command & Description|
You can apply Manage Help to check total syntax for each command mentioned here.
We will now recognize how to create a group. For this, we should to create groups before creating any account otherwise; we can create use of the existing groups in our system. We have all the groups scheduled in /etc/groups file.
All the avoidance groups are system account exact groups and it is not optional to use them for ordinary accounts. So, following is the syntax to generate a recent group account –
The following table lists out the parameters −
|S.No.||Option & Description|
If you do not denote any parameter, then the system make use of the default values.
Following instance create a developers group with defaulting values, which is very much suitable for most of the administrator.
To modify a group, use the grumped syntax –
To transform the developers_2 group name to developer, type –
Here is how you will alteration the financial GID to 545 –
We will now realize how to delete a group. To delete an active group, all you want is the grouped command and the group name. To delete the monetary group, the command is –
This removes only the group, not the files related with that group. The files are still available by their owners.
Let us observe how to make a new account on your UNIX system. Following is the syntax to form a user's account –
The following table lists out the parameter −
|S.No.||Option & Description|
If you do not identify any limit, then the system make use of the default values. The user adds commands modifies the /etc/passed, /etc/shadow, and /etc/group files and create a home directory.
Following is the instance that creates an account mcmohd, setting its home directory to /home/mcmohd and the collection as developers. This user would have Koran Shell assign to it.
Before issuing the above command, make sure you already have the developers group created using the grouped command.
Once an account is formed you can position its password using the passwdcommand as follows –
When you kind passed account name, it give you and selection to alter the password, provided you are a super user. Otherwise, you can change just your password using the same command but without specify your account name.
The sermon command enables you to make changes to an existing account from the command line. It uses the same influence as the useraddcommand, plus the -l argument, which allow you to modify the account name.
For instance, to modify the account name mcmohd to mcmohd20 and to alter home directory consequently, you will require issuing the following command –
The ushered command can be used to delete an existing user. This is a very unsafe command if not used with concern.
There is only one dispute or option available for the command .r, for remove the account's home directory and mail file.
For instance, to eliminate account mcmohd20, issue the following command –
If you desire to keep the home directory for backup purpose, exclude the -option. You can eliminate the home directory as required at a later time.
Unix/Linux Related Interview Questions
|Perl Scripting Interview Questions||Shell Scripting Interview Questions|
|Python Interview Questions||Core Java Interview Questions|
|Linux Interview Questions||Linux Embedded systems Interview Questions|
|Red Hat Linux System Administration Interview Questions||IBM AIX Interview Questions|
|Sybase Interview Questions||IBM AIX 7 Administration Interview Questions|
|Unix Shell Scripting Interview Questions||Linux Shell Scripting Interview Questions|
Unix/Linux Related Practice Tests
|Perl Scripting Practice Tests||Shell Scripting Practice Tests|
|Python Practice Tests||Core Java Practice Tests|
|Linux Practice Tests||Linux Embedded systems Practice Tests|
|Red Hat Linux System Administration Practice Tests||IBM AIX Practice Tests|
|Sybase Practice Tests||IBM AIX 7 Administration Practice Tests|
|Autosys Practice Tests|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.