1. Home
  2. Linux
  3. Change user information on linux

How to change user information on Linux

If you want to change or tweak user information on Linux, you have two options: the graphical user interface, or the terminal. For most users, the terminal is best as it’s fast and gets things done quickly. However, beginner users prefer using the GUI, as its more approachable.

In this tutorial, we’ll be going over multiple ways you can modify and change user information on Linux. We’ll cover the Linux command-line. We’ll also cover the Gnome user manager, the KDE Plasma user manager and the Cinnamon one as well.

Change user information – Terminal

While a lot of Linux desktop environments have a built-in graphical user administration tool, some don’t. That’s why it’s great to know how to manipulate and tweak user information on Linux from the Linux command-line.

Change user password

Perhaps one of the most common things people are looking to change regarding users on Linux is the password. Thankfully, it’s a very straightforward process in the terminal, and best of all, you don’t need to know the user’s current password to change anything.

To change (aka reset) a user’s password follow the step-by-step instructions below.

Step 1: Gain a Root shell in the command-line. Gaining this level of access is critical, and without it, you won’t be able to tinker with other users credentials.

Access the root account with su or sudo -s.

Step 2: Once you’ve gotten Root access, write the passwd command along with the username you’d like to change.

passwd username

Change username

For one reason or another, you may be unhappy with the name of your user account on Linux and are looking to change it to something else. To change it, you’ll need to make use of the usermod command.

Step 1: Gain Root in the terminal with sudo -s or su, to modify your username.

Step 2: Run the usermod command below, and replace newlogin and oldlogin. Newlogin should be the new username you’d like to have, and oldlogin should be the old one.

usermod -l newlogin oldlogin

Tweak user account information

The user system on Linux allows system administrators to add user information to user accounts (office number, first and last name, etc.). For the most part, this information is filled out correctly. However, if you see a mistake you’d like to tweak, follow the steps below.

Step 1: Access the Root account with sudo -s or su.

Step 2: Run the chfn command with the desired user you’d like to tweak next to it.

chfn username

Step 3: Go through and fill out all of the information for the user correctly. It should instantly save when done.

Delete username

Deleting a username on Linux through the command-line is very efficient. Best of all, it is possible to delete and remove a user along with its home directory without knowing the username’s password. Here’s how to do it.

Step 1: As always, you must gain a root shell using the sudo -s or su command.

Step 2: Run the userdel command along with the username you want to delete.

userdel username

Or, if you’d like to delete the username AND the home directory.

userdel -r username

Change user information – Gnome Shell

To access the user information area in Gnome Shell, click “Activities” at the top left of the desktop. Then, write in “Settings” and click on the Settings app icon that appears in the results.

In the Gnome Settings application, look to the left-side of the window for “Users” and click on it. You should see all users currently on your system.

Click the “Unlock” button to modify the settings. From there, you’ll be able to change the password, add a picture, or remove the user entirely by clicking on the “Remove User” button.

Change user information – KDE Plasma 5

In KDE Plasma 5, you can access the user settings by clicking the launcher icon on the panel, typing in “User Manager” into the search box, and launching the app with that name.

Once you’re in the “User Manager” area of Plasma, you’ll notice a list of all users currently on your Linux PC.

To delete a user, click the minus button. To change a password, go to the “Password” box. Lastly, to revoke admin privileges, uncheck the box next to “Enable administrator privileges for this user.”

Change user information – Cinnamon

Getting to the user settings on the Cinnamon desktop starts by clicking the launcher icon on the panel. From there, select the search box with the mouse, type in “Users and Groups” in the box and open the app that appears in the results.

You’ll be able to see all of the users on Cinnamon, in “Users and Groups.” To delete a user, highlight the one you want, then click “delete. To change the password, click the “password” box.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.