Wednesday, May 8, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 9696  / 1 Year ago, sun, february 26, 2023, 1:03:11

During the Ubuntu 12.04 LTS installation, I was prompted to enter a user name and password, so that a corresponding account could be created and set up for login. I replaced the one that was provided by default (i.e. '70319', which is the Windows 7 admin id) with a user name/id of my choosing.



Now, when I turn on the computer, and choose to enter the Ubuntu operating system, the login id that is displayed is 70319 - that is, the one provided by Windows 7. However, when I open up a Unix/Terminal shell, the user id that is displayed at the prompt is the one I entered during installation. Otherwise, the installation of Ubuntu was a success! Is there some way of changing the user id that is displayed at the Login screen, so that it is consistent with the one I entered during installation?



If it's any help, I installed Ubuntu using wubi on an ASUS Eee PC 1011PX running Windows 7, and ASUS Express Gate Cloud. Further details regarding the setup/installation can be found at the following link:



Installing Ubuntu on an Eee PC 1011PX


More From » installation

 Answers
6

The easy and safe way



Open Terminal with Ctrl+Alt+T, and type:



sudo chfn username



where username is what shows in front of the @ in the prompt.



Your existing "display name" (shown at the login screen, on the top right of the desktop, etc.) will appear enclosed in brackets [] after Full Name:. Type in whatever you want the new "display name" to be and press enter.



You can leave the remaining fields (Room number, Phone, etc.) blank (just keep pressing enter).



Once done, exit the terminal and logout. You should have a shiny new "display name"!






The direct but risky way



The original version of this answer proposed directly editing /etc/passwd to change the "display name". This is risky if you don't know the format of the passwd file, since a typo could leave you unable to login any more. You have been warned.



The general format is:



username:x:1000:1000:displayname,,,,:/home/username:/bin/bash



Change "displayname" to whatever you want the name displayed on the login screen to be, e.g. "John Doe" or just the same as "username". This name CANNOT contain colons, commas or equal-to signs.



Save and quit your editor, and PLEASE then use pwck to check that the format of /etc/passwd is still valid, using:



sudo pwck | egrep -v "directory.*does not exist"



The response you are looking for is:



pwck: no changes



Otherwise, just logout, and you should see your chosen display name.


[#38478] Sunday, February 26, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
homerurhyth

Total Points: 338
Total Questions: 113
Total Answers: 105

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
;