How to rename the main user with his previous settings?

  • one
    Well, at least you need to touch the files /etc/passwd , /etc/group* and the directory /root/ rename. The question is different: what for? - don Rumata
  • 2
    public key comment can be safely removed. characters of the form пользователь@машина at the end of the public key are just a comment. - aleksandr barakin
  • 2
    And what prevents to make sudo adduser timur and live there? - don Rumata
  • four
    I can now recall the famous picture of a trolley bus from a loaf of bread. But IMHO, judging by the problem described, you work under a user in which the number of places is numbered from the name of a colleague and it is spelled NOT in the system, but in a specific user. Therefore, the best solution is to create your own sandbox, and transfer settings and documents as needed, because no one took away root\sudo (and if you did, you don’t have to reset it). - don Rumata
  • 2
    sudo adduser merrymaker14 adm && sudo adduser merrymaker14 sudo . Make from under the old profile of course. - don Rumata

1 answer 1

 sudo usermod --login НОВОЕ_ИМЯ СТАРОЕ_ИМЯ