D
D
Drew2016-08-26 16:37:29
linux
Drew, 2016-08-26 16:37:29

How can I change the username that is the only one without interrupting the processes?

We have:
[email protected]:~$
user is the only one and he has the same admin rights
How can I change his name (to himself) from this user's account without interrupting the processes associated with this user and without creating a new one, copying the admin privileges to him?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan Bogachev, 2016-08-26
@druNJ

If you read the mana for usermod , you will notice that
Therefore, renaming yourself is quite problematic. If you allow login for root (it is disabled by default in ubuntu) or create another user with the necessary rights, then you can log out with the current user "user", go as root (or that new user) and rename the user "user".

D
Dmitry Shitskov, 2016-08-26
@Zarom

usermod user -l newusername

D
Drew, 2016-08-26
@druNJ

When usermod user -l newusername displays
usermod: user User is currently used by process 2550
If you start killing processes by pid, the system is rebooted and it becomes possible to enter it only as a guest without any rights at all
True, upon repeated reboot, the old username returns to the login option .
So far no answer: how to rename without stopping related processes?

A
AbaySeitkaliyev, 2019-06-06
@AbaySeitkaliyev

usermod -l newusername -m -d /home/newusername currentusername exit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question