How to edit user accounts on Linux Mint with the usermod command.

Posted: March 4, 2013. At: 8:56 PM. This was 5 years ago. Post ID: 5440
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

The usermod command offers the Linux user the ability to edit user accounts or lock out a user as well as changing the users login shell. Here I am editing the comment about the user “hoshi”.

adeptus-mechanicus ~ # usermod -c "New user" hoshi

This command parameter changes the login name of user “hoshi”.

adeptus-mechanicus ~ # usermod -l star hoshi

This parameter will lock the user account so that the user can not login.

adeptus-mechanicus ~ # usermod -L star

And here is how to change the users shell with the usermod command.

adeptus-mechanicus ~ # usermod -s /bin/sh star

This is how to set a new password for the user using the usermod command.

adeptus-mechanicus ~ # usermod -p password101 star

Easier to use the passwd command though.

adeptus-mechanicus ~ # passwd star
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

And this is a better way to change the users login shell using the chsh command.

adeptus-mechanicus ~ # chsh star
Changing the login shell for star
Enter the new value, or press ENTER for the default
	Login Shell [/bin/sh]: /bin/bash

No comments have been made. Use this form to start the conversation :)

Leave a Reply