Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 16127  / 1 Year ago, mon, march 6, 2023, 12:29:39

I wanted to change my username, and tried out this explanation here: https://askubuntu.com/a/205470/112035.



First, I changed the username in /etc/passwd to the new one. Then I wanted to change it at /etc/group too, but since changing it at the first file I can't login as root anymore.



Is there a way to solve this? Thanks in advance!


More From » login

 Answers
5

You will need to get root privileges at boot time. Then you can revert the change you made and reset the password on the primary account.



How do I reset a lost administrative password?



Be very careful changing usernames. /etc/passwd associates each username with a user ID (number). In some places in the system the number is used, in others the name. To change a username without breaking things you therefore have to change the name everywhere it occurs. I would recommend that you not try to change your username unless you are an expert. If you are an expert then I don't have to tell you about usermod(8). ;-)


[#33712] Wednesday, March 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
freezidepu

Total Points: 394
Total Questions: 105
Total Answers: 118

Location: Libya
Member since Mon, Dec 7, 2020
3 Years ago
;