Aslam O Alikum,

Dear friends, I am Jawad Mansoor and I used this name while installing Debian Stretch as User Name, later when it asked me for User ID I just gave it jawad so now when I whoami it returns jawad@Eden.
I created a new login with name neo and it easily gets logged with correct password. I was told to change my user ID but I don't know exactly what to change in

  • /etc/passwd

  • /etc/group

  • /etc/shadow
    line starts with jawad:$6$ then continues a long string which ends in :17465:0:99999:7:::

Extra information: I changed my name in setting from Jawad Mansoor to Jawad now when login screen appears that name "Jawad" instead of "Jawad Mansoor" appears.
Also, I had created an other account neo which opens easily in command line when I press CTRL+ALT+F3 to start in command line and it asks me to enter login information, I enter neo as user ID and password associated with it, however, when I try Jawad or jawad or (with quotes) "Jawad Mansoor" or (with quotes to complete string) "jawad mansoor" or jawad mansoor and type password it says that wrong login id and password.

Thanking in advance.

Jawad Mansoor

  • Aslam O Alikum, please log in with neo on the command line and then issue the following: su -l jawad. Does jawad's password contain numbers and do you use the number pad for that ? When you hit Ctrl+Alt+F3, NumLock is disabled, so you have to taggle NumLock if you want to use the number pad.
    – thecarpy
    Nov 18, 2017 at 9:56
  • @thecarpy : Jazak Allah brother, THAT WAS the problem. In GUI mode I could see if password is being typed or not so I was able to correct this, however, in command line I simple did not know and so I could not login. Yes, it righted the wrong. Nov 19, 2017 at 2:37
  • Just for knowledge, why was the question down-voted? I think it is easy to understand, laid out well, all required information was laid out well and I have tried many things before coming to post question here, and have mentioned that as well. Nov 19, 2017 at 2:46

1 Answer 1


Linux is case-sensitive in usernames. Historically, in Unix-style systems, the login name (or "user ID" as Debian seems to call it) was up to 8 characters and all-lowercase. In old Unix systems, if your login name included upper-case characters, the system automatically used ALL UPPER CASE on your login session because some ancient terminals did not have lower-case characters available.

Modern Debian can handle longer than 8-character user IDs with mixed case easily, but some programs may still only show the first 8 characters of user ID.

User name, on the other hand, is supposed to be the full human name of the user in question. It is not used for login, but applications may use it if necessary: for example, an email application might format the From: field of emails you write as

From: Jawad Mansoor <jawad@eden>

To change the full name associated with a particular username, use the command

chfn <userid>

(The command name is shorthand for CHange Finger Name, referring to an old system service called "finger" which is no longer used very often. It could be used to query some basic information on other users. It was a totally unauthenticated and unencrypted service, and so was suitable for secure, trusted networks only.)

For example, if you want to change the name associated with your user id "jawad" back to "Jawad Mansoor", you can do it on the command line by:

chfn jawad
Password: <enter your password>
Changing finger information for jawad
Enter the new value, or press ENTER for the default
Full Name [Jawad]: Jawad Mansoor
Room Number []:
Work Phone []:
Home Phone []:

On the other hand, if you want to change the user ID associated to a particular user account, then you'll need the "usermod" command, which is normally usable as root only. I'll use the prefix command "sudo" for getting root access in my examples; however, it is possible to switch to root using the "su -" command or just log in as root on the console, and then use the following commands directly as root without the "sudo" prefix.

Two user accounts cannot have the same name, so if you wanted your current account "jawad" have user ID "neo" instead, you would first have to delete the user account "neo":

sudo userdel -r neo

Then you can change the user ID of the "jawad" account to "neo":

sudo usermod -l neo jawad

If you are logged in as "jawad" while making this change, it might be wise to log out and back in at this point. Otherwise some commands and applications might show errors instead of your user ID. (One old funny error message that might happen in such a situation is "You don't exist. Go away!")

After logging out, you can now log in as "neo": the user ID "jawad" will no longer exist. Note that all the other features of the user account will be the ones the user ID "jawad" had previously: for example, the home directory will still be /home/jawad. If you want to change this, it can be done with

sudo usermod -m -d /home/neo neo

i.e. "move the home directory of user 'neo' to /home/neo"

However, it would be best to use this command while logged in as some other user. (It is possible to yank the home directory out from "under the feet" of a logged-in user, but it is even more likely to cause various kinds of confusion!)

After all these commands I've shown as examples, the default From: line of any emails you might wrote in that system would now look like:

From: Jawad Mansoor <neo@Eden>
  • Thank you very much, that was a detailed answer and I learned a lot from it. Even though the problem was that I can't use numeric pad while in command line, so the problem was solved, thanks to the hint of the brother above, when I typed through normal keys. And thanks to you I was able to learn how to change user ID and revert back. Nov 19, 2017 at 2:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .