Chaning Username in Terminal
#1
Hello all,

Sorry if i already missed the posting but I have been trying to change the username in the terminal from somthing other than pine64@pinebook. I have changed my name on login but in the terminal still keep the old username. I also tried using:


Code:
    usermod -l newname pine64


and i get the message:


Code:
    usermod: user pine64 is currently used by process 941


The number at the end changes but I get the message everytime I have tried.

Is is possible to make this modification?

Thank you,

Coyote
#2
https://unix.stackexchange.com/questions...ed-by-proc

Short answer: Change usernames from another user
#3
Its possible to do - but quite tricky to also change home folder name etc., Why not just create a new user and add to relevant groups ?
You can find me on IRC, Discord and Twitter


#4
adduser, deluser (if you like), and the copying over of files if necessary should cover everything in principle.
------
it doesn't get happy
it doesn't get sad
it just runs programs
#5
Smile 
Hello all,

Thank you all for the replies. Not logging in the pine64 account and logging in as root and changing the username worked.

Coyote
#6
Information 
Yeah, you can't change the username if that user is logged in. Basically what is needed to rename/move is:

sudo passwd root [to set the root password]

logout of your account [ie. pine64]

log in to root account [using newly set password]

usermod -l new-login-name -d /home/new-login-name -m pine64 [renames pine64 to new-login-name, moves home directory]

logout out of root, log back in as new-login name

run sudo passwd -l root to lock the root account again if you wish. use passwd (without sudo) to change the password of the newly renamed account if it is still pine64 Wink


Forum Jump:


Users browsing this thread: 1 Guest(s)