Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
sambaAnoBuatTutorHow to Configure FTP Server in
1
Download
of 14
A Nice OSCP Cheat Sheet
Search document
The command ‘useradd ‘ or ‘adduser ‘ is used for creating user accounts in Linux systems. T more about on how to create system users, read our complete guide at: 1.
A Complete Guide to “useradd” Command in Linux
After creating user accounts, in some scenarios where we n eed to change the attributes of an user such as, change user’s home directory, login name, login shell, password expiry date, et where in in such case ‘usermod’ command is used.
When we execute ‘usermod‘ command in terminal, the following files are used and affected 1. 2. 3. 4. 5.
User account information. /etc/passwd – User Secure account information. /etc/shadow – Secure /etc/group – Group Group account information. Secure group account information. /etc/gshadow – Secure Shadow password suite configuration.. /etc/login.defs – Shadow
Basic syntax of command is:
usermod [options]
username
Requirements
1. 2. 3. 4.
We must have existing user accounts to execute usermod command. Only superuser (root) is allowed to execute usermod co mmand. The usermod command can be executed on any Linux distribution. Must have basic knowledge of usermod command with options
Options of Usermod Sign up to vote on this title
The ‘usermod‘ command is simple to use with lots of options to make changes to an existin Not useful Useful users Let us see how to use usermod use rmod command by modifying some existing in Linux box wi help of following options.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Sign In
Upload
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
13. -U = To unlock the user accounts. This will remove the password lock and allow us t the user account.
In this article we will see ‘ 15 usermod commands ‘ with their practical examples and usage Linux, which will help you to learn and enhance your command-line skills using these optio
1. Adding Information to User Account
The ‘-c‘ option is used to set a brief comment (information) about the user account. For exam let’s add information on ‘tecmint‘ user, using the following command.
# usermod -c "This is Tecmint" tecmint After adding information on user, the same comment can be viewed in /etc/passwd file.
# grep -E --color 'tecmint' /etc/passwd tecmint:x:500:500: This is Tecmint:/home/tecmint:/bin/sh
Add Information to User 2. Change User Home Directory
In the above step we can see that our home directory is under /home/tecmint/ , If we need to it to some other directory we can change using -d option with usermod command. You'reit Reading a Preview
Unlock full access with a free trial. For example, I want to change our home directory to /var/www/ , but before changing, let’s c the current home directory of a user, using the following command. Download With Free Trial # grep -E --color '/home/tecmint' /etc/passwd
tecmint:x:500:500:This is Tecmint:/home/tecmint :/bin/sh
Now, change home directory from /home/tecmint to /var/www/ and confirm the home direc after changing. Sign up to vote on this title
# usermod -d /var/www/ tecmint Useful # grep -E --color '/var/www/' /etc/passwd tecmint:x:500:500:This is Tecmint:/var/www:/bin/sh
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Sign In
Upload
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
Password inactive Account expires Minimum number of days between password change Maximum number of days between password change Number of days of warning before password expires
: : : : :
never
Dec 01, 2014 0 99999 7
The expiry status of a ‘tecmint ‘ user is Dec 1 2014, let’s change it to Nov 1 2014 using ‘use e‘ option and confirm the expiry date with ‘chage‘ command.
# usermod -e 2014-11-01 tecmint # chage -l tecmint Last password change Password expires Password inactive Account expires Minimum number of days between password change Maximum number of days between password change Number of days of warning before password expires
: Nov 02, 2014 : never : never : Nov 01, 2014 : 0 : 99999 : 7
4. Change User Primary Group
To set or change a user primary group, we use option ‘-g‘ with usermod command. Before, c user primary group, first make sure to check the current group for the user tecmint_test .
# id tecmint_test You're Reading a Preview
uid=501(tecmint_test) gid=502(tecmint_test) groups=502(tecmint_test) Unlock full access with a free trial.
Now, set the babin group as a primary group to user tecmint_test and confirm the changes.
Download With Free Trial
# usermod -g babin tecmint_test # id tecmint_test
uid=501(tecmint_test) gid=502( babin) groups=502(tecmint_test)
5. Adding Group to an Existing User
Sign up to vote on this title
Useful Not useful If you want to add a new group called ‘tecmint_test0 ‘ to ‘tecmint ‘ user, you can use option with usermod command as shown below.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
# usermod -a -G wheel tecmint_test0 # id tecmint_test0
So, user tecmint_test0 remains in its primary group and also in secondary group (wheel). Th make my normal user account to execute any root privileged commands in Linux box. eg : sudo service httpd restart
7. Change User Login Name
To change any existing user login name, we can use ‘-l‘ (new login) option. In the example b we changing login name tecmint to tecmint_admin . So the username tecmint has been rena with the new name tecmint_admin . # usermod -l tecmint_admin tecmint
Now check for the tecmint user, It will not be present because we have changed it to tecmint_admin . # id tecmint
Check for the tecmint_admin account it will be there with same UID and with existing grou we have added before. # id tecmint_admin
You're Reading a Preview
8. Lock User Account
Unlock full access with a free trial.
-L‘ (lock) To Lock any system user account, we can use ‘With option, after the account is locked Download Free Trial login by using the password and you will see a ! added before the encrypted password in /etc/shadow file, means passwrd disabled. Here I’m going to lock (disable) a user named: # usermod -L babin
Check for the locked account.
Sign up to vote on this title
# grep -E --color 'babin' cat /etc/shadow Useful
9. Unlock User Account
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
Unlock User Account 10. Move User Home Directory to New location
Let’s say you’ve a user account as ‘pinky‘ with home directory ‘/home/pinky ‘, you want to to new location say ‘/var/pinky ‘. You can use the options ‘-d‘ and ‘-m‘ to move the existing files from current home directory to a new home directory. Check for the account and it’s current homeReading directory. You're a Preview Unlock full access with a free trial. # grep -E --color 'pinky' /etc/passwd
Then list the files which is owned byDownload user pinky. With Free Trial # ls -l /home/pinky/
Now we have to move the home directory from /home/pinky to /var/pinky . # usermod -d /var/pinky/ -m pinky
Next, verify the directory change. # grep -E --color 'pinky' /etc/passwd
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
# usermod -p redhat pinky
Sheet Music
After setting password, now check the shadow file to see whether its in encrypted format or encrypted. # grep -E --color 'pinky' /etc/shadow
Create Unencrypted User Password
Note: Did you see in the above image, the password is clearly visible to everyone. So, this o not recommended to use, because the password will be visible to all users. 12. Change User Shell
You're Reading a Preview
The user login shell can be changedUnlock or defined during creation with useradd command full access with auser free trial. changed with ‘usermod ‘ command using option ‘-s‘ (shell). For example, the user ‘babin /bin/bash shell by default, now I want to change it to /bin/sh . Download With Free Trial # grep -E --color 'babin' /etc/passwd # usermod -s /bin/sh babin
After changing user shell, verify the user shell using the following command. # grep -E --color 'babin' /etc/passwd
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Sign In
Upload
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
# grep -E --color 'babin' /etc/passwd OR # id babin
Now, let’s change the UID for user babin using ‘-u‘ (uid) option and verify the changes. # usermod -u 888 babin # id babin
14. Modifying User Account with Multiple Options
Here we have a user jack and now I want to modify his home directory, shell, expiry date, la UID and group at once using one single command with all options as we discussed above.
The user Jack has the default home directory /home/jack , Now I want to change it to /var/www/html and assign his shell as bash, set expiry date as December 10th 2014, add ne as This is jack , change UID to 555 and he will be member of apple group. Let we see how to modify the jack account using multiple option now. # usermod -d /var/www/html/ -s /bin/bash -e 2014-12-10 -c "This is
-u 555 -aG apple jack Then check for the UID & home directory changes.
You're Reading a Preview
# grep -E --color 'jack' /etc/passwd
Unlock full access with a free trial.
Account expire check. # chage -l jack
Download With Free Trial
Check for the group which all jack have been member. # grep -E --color 'jack' /etc/group
15. Change UID and GID of a User
Sign up to vote on this title
Useful
Not useful
We can change UID (user id) and GID (group id) of a current user. For changing to a New G need an existing group. Here already there is an account named as orange with GID of 777
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
# id jack
Sheet Music
Change User UID and GID
Conclusion
Here we have seen how to use usermod command with its options in very detailed fashion, B knowing about usermod command, one should must know ‘useradd’ command and its optio the usermod. If I’ve missed any point in the article do let me know via comments and don’t add your valuable comments. Source: http://www.tecmint.com/usermod-command-examples/#
You're Reading a Preview
Editor :
Unlock full access with a free trial.
Hamami InkaZo Instructor and CEO of TKJ Department Download With Free Trial SMK Informatika Wonosobo www.facebook.com/hammamy
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
We all are aware about the most popular command called ‘useradd ‘ or ‘adduser ‘ in Linux. are times when a Linux System Administrator asked to create user accounts on Linux with specific properties, limitations or comments.
In Linux, a ‘useradd ‘ command is a low-level utility that is used for adding/creating user ac in Linux and other Unix-like operating systems. The ‘adduser ‘ is much similar to useradd command, because it is just a symbolic link to it.
In some other Linux distributions, useradd command may comes with lightly difference ver suggest you to read your documentation, before using our instructions to create new user acc Linux. When we run ‘useradd ‘ command in Linux terminal, it performs following major things:
1. It edits /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow files for the newly crea User account. 2. Creates and populate a home directory for the new user. 3. Sets permissions and ownerships to home directory. Basic syntax of command is:
useradd [options] username
In this article we will show you the most used 15 useradd commands with their practical ex You're Preview Basic to Advance usage of comm in Linux. We have divided the section intoReading two partsa from Unlock full access with a free trial.
1. Part I: Basic usage with 10 examples 2. Part II: Advance usage with 5 examples Download With Free Trial
Part I – 10 Basic Usage of useradd Commands 1. How to Add a New User in Linux
To add/create a new user, all you’ve to follow the command ‘useradd ‘ or ‘adduser ‘ with Sign up voteto onlogin this title ‘username’. The ‘username’ is a user login name, that is used bytouser into the system
Useful
Not useful
Only one user can be added and that username must be unique (different from other usernam already exists on the system).
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
0
102 views
Sign In
Upload
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
Pa
Once a new user created, it’s entry automatically added to the ‘/etc/passwd ‘ file. The file is u store users information and the entry should be. tecmint:x:504:504:tecmint:/home/tecmint:/bin/bash
The above entry contains a set of seven colon-separated fields, each field has it’s own meani Let’s see what are these fields:
1. Username: User login name used to login into system. It should be between 1 to 32 charcters long. 2. Password : User password (or x character) stored in /etc/shadow file in encrypted for 3. User ID (UID) : Every user must have a User ID (UID) User Identification Number. default UID 0 is reserved for root user and U ID’s ranging from 1-99 are reserved for predefined accounts. Further UID’s ranging from 100-999 are reserved for system ac and groups. 4. Group ID (GID) : The primary Group ID (GID) Group Identification Number stored /etc/group file. 5. User Info: This field is optional and allow you to define extra information about the For example, user full name. This field is filled by ‘finger’ command. 6. Home Directory : The absolute location of user’s home directory. 7. Shell: The absolute location of a user’s shell i.e. /bin/bash. 2. Create a User with Different Home Directory
You're Reading a Preview By default ‘useradd ‘ command creates a user’s home directory under /home directory with username. Thus, for example, we’ve seen above the default home directory for the user ‘tecm Unlock full access with a free trial. ‘/home/tecmint ‘.
Free Trial -d‘ option However, this action can be changedDownload by using ‘With along with the location of new hom directory (i.e. /data/projects ). For example, the following command will create a user ‘anus with a home directory ‘/data/projects ‘. [root@tecmint ~]# useradd -d /data/projects anusha
You can see the user home directory and other user relatedSign information like user id, group id up to vote on this title and comments.
Useful
[root@tecmint ~]# cat /etc/passwd | grep anusha
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
Pa [root@tecmint ~]# cat /etc/passwd | grep tecmint
Sheet Music
navin:x:999:999::/home/navin:/bin/bash
NOTE: Make sure the value of a user ID must be unique from any other already created use system. 4. Create a User with Specific Group ID
Similarly, every user has its own GID (Group Identification Number ). We can create user specific group ID’s as well with -g option.
Here in this example, we will add a user ‘ tarunika ‘ with a specific UID and GID simultaneo with the help of ‘-u‘ and ‘-g‘ options. [root@tecmint ~]# useradd -u 1000 -g 500 tarunika
Now, see the assigned user id and group id in ‘/etc/passwd‘ file. [root@tecmint ~]# cat /etc/passwd | grep tarunika
tarunika:x:1000:500::/home/tarunika:/bin/bash
5. Add a User to Multiple Groups
Readinggroups. a Preview The ‘-G‘ option is used to add a userYou're to additional Each group name is separated by comma, with no intervening spaces.Unlock full access with a free trial.
Here in this example, we are adding a user ‘tecmint‘ into multiple groups like admins , weba Download With Free Trial and developer . [root@tecmint ~]# useradd -G admins,webadmin,developers tecmint
Next, verify that the multiple groups assigned to the user with id command. [root@tecmint ~]# id tecmint
Sign up to vote on this title
Useful Not useful uid=1001(tecmint) gid=1001(tecmint) groups=1001( tecmint),500(admins),501( webadmin),502(developers) context=root:system_r:unconfined_t:SystemLow-SystemHigh
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
0
102 views
Sign In
Upload
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
Pa Now, let’s verify that the user is created without home directory, using ls command.
Sheet Music
[root@tecmint ~]# ls -l /home/shilpi ls: cannot access /home/shilpi : No such file or directory
7. Create a User with Account Expiry Date
By default, when we add user’s with ‘useradd ‘ command user account never get expires i.e expiry date is set to 0 (means never expired).
However, we can set the expiry date using ‘-e‘ option, that sets date in YYYY-MM-DD form This is helpful for creating temporary accounts for a specific period of time.
Here in this example, we create a user ‘aparna ‘ with account expiry date i.e. 27th April 201 YYYY-MM-DD format. [root@tecmint ~]# useradd -e 2014-03-27 aparna
Next, verify the age of account and password with ‘chage‘ command for user ‘aparna‘ after account expiry date. [root@tecmint ~]# chage -l aparna Last password change You're Reading a Preview Password expires Password inactive Unlock full access with a free trial. Account expires Minimum number of days between password change Maximum number of days between password change Download With Free Trial Number of days of warning before password expires
: : : :
Mar 28, never never Mar 27, : : : 7
201
201 0 999
8. Create a User with Password Expiry Date
The ‘-f ‘ argument is used to define the number of days after a password expires. A value of inactive the user account as soon as the password has expired. By default, the password expi set to -1 means never expire. Sign up to vote on this title
Useful
Not useful
Here in this example, we will set a account password expiry date i.e. 45 days on a user ‘tecm using ‘-e‘ and ‘-f ‘ options.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
0
102 views
Sign In
Upload
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
Pa You can see your comments in ‘/etc/passwd ‘ file in comments section.
Sheet Music
[root@tecmint ~]# tail -1 /etc/passwd
mansi:x:1006:1008: Manis Khurana:/home/mansi:/bin/sh
10. Change User Login Shell:
Sometimes, we add users which has nothing to do with login shell or sometimes we require t different shells to our users. We can assign different login shells to a each user with ‘ -s‘ opti Here in this example, will add a user ‘ tecmint ‘ without login shell i.e. ‘/sbin/nologin ‘ shell. [root@tecmint ~]# useradd -s /sbin/nologin tecmint
You can check assigned shell to the user in ‘/etc/passwd ‘ file. [root@tecmint ~]# tail -1 /etc/passwd
tecmint:x:1002:1002::/home/tecmint: /sbin/nologin
Part II – 5 Advance Usage of useradd Commands 11. Add a User with Specific Home Directory, Default Shell and Custom Comment
a Preview The following command will create You're a user ‘Reading home directory ‘/var/www/tecmint ravi‘ with shell /bin/bash and adds extra information Unlock fullabout accessuser. with a free trial.
[root@tecmint ~]# useradd -m -d /var/www/ravi -s /bin/bash -c "TecMin
Owner" -U ravi
Download With Free Trial
In the above command ‘-m -d‘ option creates a user with specified home directory and the ‘ option set the user’s default shell i.e. /bin/bash . The ‘-c‘ option adds the extra information a user and ‘-U‘ argument create/adds a group with the same name as the user. 12. Add a User with Home Directory, Custom Shell, Custom and Sign up Comment to vote on this titleUID/GID
Useful
Not useful
The command is very similar to above, but here we defining shell as ‘/bin/zsh‘ and custom GID to a user ‘tarunika‘. Where ‘-u‘ defines new user’s UID (i.e. 1000) and whereas ‘-g
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
0
102 views
Upload
Sign In
Join
RELATED TITLES
0
A Complete Guide to Usage of USERMOD and USERADD command.pdf
Uploaded by Hamami InkaZo
Save
Embed
Share
Print
Download
sambaAnoBuatTutorHow to Configure FTP Server in
1
of 14
A Nice OSCP Cheat Sheet
Search document
Pa
[root@tecmint ~]# useradd -m -d /var/www/avishek -s /usr/sbin/nologin
Sheet Music
"TecMint Sr. Technical Writer" -u 1019 avishek 14. Add a User with Home Directory, Shell, Custom Skell/Comment and User ID
The only change in this command is, we used ‘-k ‘ option to set custom skeleton directory i.e /etc/custom.skell , not the default one /etc/skel . We also used ‘-s‘ option to define different s /bin/tcsh to user ‘navin‘.
[root@tecmint ~]# useradd -m -d /var/www/navin -k /etc/custom.skell -
/bin/tcsh -c "No Active Member of TecMint" -u 1027 navin 15. Add a User without Home Directory, No Shell, No Group and Custom Comment
This following command is very different than the other commands explained above. Here w ‘-M‘ option to create user without user’s home directory and ‘-N‘ argument is used that tells system to only create username (without group). The ‘-r‘ arguments is for creating a system
[root@tecmint ~]# useradd -M -N -r -s /bin/false -c "Disabled TecMint
Member" clayton
For more information and options about useradd, run ‘useradd ‘ command on the terminal to available options. Source: http://www.tecmint.com/add-users-in-linux/ You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join