When trying to change username, terminal tells me user is currently used by process
Clash Royale CLAN TAG#URR8PPP
up vote
10
down vote
favorite
I am trying to change my username, as per advice here however after running the following command:
CurrentName@HostName ~ $ sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
Terminal responds with:
CurrentName@HostName ~ $ usermod: user CurrentName is currently used by process 2491
And the username stays the same. Does anybody know how I could fix this and change my username after all?
linux ubuntu linux-mint users
add a comment |
up vote
10
down vote
favorite
I am trying to change my username, as per advice here however after running the following command:
CurrentName@HostName ~ $ sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
Terminal responds with:
CurrentName@HostName ~ $ usermod: user CurrentName is currently used by process 2491
And the username stays the same. Does anybody know how I could fix this and change my username after all?
linux ubuntu linux-mint users
add a comment |
up vote
10
down vote
favorite
up vote
10
down vote
favorite
I am trying to change my username, as per advice here however after running the following command:
CurrentName@HostName ~ $ sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
Terminal responds with:
CurrentName@HostName ~ $ usermod: user CurrentName is currently used by process 2491
And the username stays the same. Does anybody know how I could fix this and change my username after all?
linux ubuntu linux-mint users
I am trying to change my username, as per advice here however after running the following command:
CurrentName@HostName ~ $ sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
Terminal responds with:
CurrentName@HostName ~ $ usermod: user CurrentName is currently used by process 2491
And the username stays the same. Does anybody know how I could fix this and change my username after all?
linux ubuntu linux-mint users
linux ubuntu linux-mint users
edited Oct 3 '15 at 2:27
asked Oct 3 '15 at 0:38
Paradox
2841320
2841320
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
up vote
8
down vote
accepted
To quote man usermod
:
CAVEATS
You must make certain that the named user is not executing any
processes when this command is being executed
if the user's numerical user ID, the user's name, or the user's home
directory is being changed. usermod
checks this on Linux, but only check if the user is logged in
according to utmp on other architectures.
So, you need to make sure the user you're renaming is not logged in.
Also, I note you're not running this as root. Either run it as root, or run with "sudo usermod".
if you can't kill the process without it restarting, combine the command e.g.kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
– Richard Frank
Apr 19 '17 at 11:45
The programusermod
seems to be broken by design. If the user management is done in a LDAP server, changing a user attribute is always possible and does not depend on the running system. I am using Ansible which usesusermod
and the hole system is unreliable, because changes are blocked by users logged in.
– ceving
Aug 2 '17 at 14:17
add a comment |
up vote
1
down vote
I think that you should run the command with another user. Login with root, or other user, and try again. If you are in the x window with the user that you want to change, sounds logical that the commands fails.
add a comment |
up vote
0
down vote
I have the same issue using usermod, it fixed using the -m parameter, that move the content of the home directory to a new localization. Use this option in combination with -d (modify the user main directory, where there user ).
I suggest to see the man usermod command
add a comment |
up vote
0
down vote
This is mainly a problem with Ubutu where you don't have a root account to login from the first place. So this create a contradiction: I am a user in the sudoer group. I cannot change my own uid.
Not sure this is the best solution. I first create a fake account foo, add this to the sudo list. Then I login to the foo account and execute usermod -g MYOWNGID mylogin
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
To quote man usermod
:
CAVEATS
You must make certain that the named user is not executing any
processes when this command is being executed
if the user's numerical user ID, the user's name, or the user's home
directory is being changed. usermod
checks this on Linux, but only check if the user is logged in
according to utmp on other architectures.
So, you need to make sure the user you're renaming is not logged in.
Also, I note you're not running this as root. Either run it as root, or run with "sudo usermod".
if you can't kill the process without it restarting, combine the command e.g.kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
– Richard Frank
Apr 19 '17 at 11:45
The programusermod
seems to be broken by design. If the user management is done in a LDAP server, changing a user attribute is always possible and does not depend on the running system. I am using Ansible which usesusermod
and the hole system is unreliable, because changes are blocked by users logged in.
– ceving
Aug 2 '17 at 14:17
add a comment |
up vote
8
down vote
accepted
To quote man usermod
:
CAVEATS
You must make certain that the named user is not executing any
processes when this command is being executed
if the user's numerical user ID, the user's name, or the user's home
directory is being changed. usermod
checks this on Linux, but only check if the user is logged in
according to utmp on other architectures.
So, you need to make sure the user you're renaming is not logged in.
Also, I note you're not running this as root. Either run it as root, or run with "sudo usermod".
if you can't kill the process without it restarting, combine the command e.g.kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
– Richard Frank
Apr 19 '17 at 11:45
The programusermod
seems to be broken by design. If the user management is done in a LDAP server, changing a user attribute is always possible and does not depend on the running system. I am using Ansible which usesusermod
and the hole system is unreliable, because changes are blocked by users logged in.
– ceving
Aug 2 '17 at 14:17
add a comment |
up vote
8
down vote
accepted
up vote
8
down vote
accepted
To quote man usermod
:
CAVEATS
You must make certain that the named user is not executing any
processes when this command is being executed
if the user's numerical user ID, the user's name, or the user's home
directory is being changed. usermod
checks this on Linux, but only check if the user is logged in
according to utmp on other architectures.
So, you need to make sure the user you're renaming is not logged in.
Also, I note you're not running this as root. Either run it as root, or run with "sudo usermod".
To quote man usermod
:
CAVEATS
You must make certain that the named user is not executing any
processes when this command is being executed
if the user's numerical user ID, the user's name, or the user's home
directory is being changed. usermod
checks this on Linux, but only check if the user is logged in
according to utmp on other architectures.
So, you need to make sure the user you're renaming is not logged in.
Also, I note you're not running this as root. Either run it as root, or run with "sudo usermod".
answered Oct 3 '15 at 1:24
seumasmac
1,373710
1,373710
if you can't kill the process without it restarting, combine the command e.g.kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
– Richard Frank
Apr 19 '17 at 11:45
The programusermod
seems to be broken by design. If the user management is done in a LDAP server, changing a user attribute is always possible and does not depend on the running system. I am using Ansible which usesusermod
and the hole system is unreliable, because changes are blocked by users logged in.
– ceving
Aug 2 '17 at 14:17
add a comment |
if you can't kill the process without it restarting, combine the command e.g.kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
– Richard Frank
Apr 19 '17 at 11:45
The programusermod
seems to be broken by design. If the user management is done in a LDAP server, changing a user attribute is always possible and does not depend on the running system. I am using Ansible which usesusermod
and the hole system is unreliable, because changes are blocked by users logged in.
– ceving
Aug 2 '17 at 14:17
if you can't kill the process without it restarting, combine the command e.g.
kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
– Richard Frank
Apr 19 '17 at 11:45
if you can't kill the process without it restarting, combine the command e.g.
kill -9 23162 && sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName
– Richard Frank
Apr 19 '17 at 11:45
The program
usermod
seems to be broken by design. If the user management is done in a LDAP server, changing a user attribute is always possible and does not depend on the running system. I am using Ansible which uses usermod
and the hole system is unreliable, because changes are blocked by users logged in.– ceving
Aug 2 '17 at 14:17
The program
usermod
seems to be broken by design. If the user management is done in a LDAP server, changing a user attribute is always possible and does not depend on the running system. I am using Ansible which uses usermod
and the hole system is unreliable, because changes are blocked by users logged in.– ceving
Aug 2 '17 at 14:17
add a comment |
up vote
1
down vote
I think that you should run the command with another user. Login with root, or other user, and try again. If you are in the x window with the user that you want to change, sounds logical that the commands fails.
add a comment |
up vote
1
down vote
I think that you should run the command with another user. Login with root, or other user, and try again. If you are in the x window with the user that you want to change, sounds logical that the commands fails.
add a comment |
up vote
1
down vote
up vote
1
down vote
I think that you should run the command with another user. Login with root, or other user, and try again. If you are in the x window with the user that you want to change, sounds logical that the commands fails.
I think that you should run the command with another user. Login with root, or other user, and try again. If you are in the x window with the user that you want to change, sounds logical that the commands fails.
answered Oct 3 '15 at 1:23
krivos
163
163
add a comment |
add a comment |
up vote
0
down vote
I have the same issue using usermod, it fixed using the -m parameter, that move the content of the home directory to a new localization. Use this option in combination with -d (modify the user main directory, where there user ).
I suggest to see the man usermod command
add a comment |
up vote
0
down vote
I have the same issue using usermod, it fixed using the -m parameter, that move the content of the home directory to a new localization. Use this option in combination with -d (modify the user main directory, where there user ).
I suggest to see the man usermod command
add a comment |
up vote
0
down vote
up vote
0
down vote
I have the same issue using usermod, it fixed using the -m parameter, that move the content of the home directory to a new localization. Use this option in combination with -d (modify the user main directory, where there user ).
I suggest to see the man usermod command
I have the same issue using usermod, it fixed using the -m parameter, that move the content of the home directory to a new localization. Use this option in combination with -d (modify the user main directory, where there user ).
I suggest to see the man usermod command
answered Feb 3 at 6:40
Guillermo Porras Arias
1
1
add a comment |
add a comment |
up vote
0
down vote
This is mainly a problem with Ubutu where you don't have a root account to login from the first place. So this create a contradiction: I am a user in the sudoer group. I cannot change my own uid.
Not sure this is the best solution. I first create a fake account foo, add this to the sudo list. Then I login to the foo account and execute usermod -g MYOWNGID mylogin
add a comment |
up vote
0
down vote
This is mainly a problem with Ubutu where you don't have a root account to login from the first place. So this create a contradiction: I am a user in the sudoer group. I cannot change my own uid.
Not sure this is the best solution. I first create a fake account foo, add this to the sudo list. Then I login to the foo account and execute usermod -g MYOWNGID mylogin
add a comment |
up vote
0
down vote
up vote
0
down vote
This is mainly a problem with Ubutu where you don't have a root account to login from the first place. So this create a contradiction: I am a user in the sudoer group. I cannot change my own uid.
Not sure this is the best solution. I first create a fake account foo, add this to the sudo list. Then I login to the foo account and execute usermod -g MYOWNGID mylogin
This is mainly a problem with Ubutu where you don't have a root account to login from the first place. So this create a contradiction: I am a user in the sudoer group. I cannot change my own uid.
Not sure this is the best solution. I first create a fake account foo, add this to the sudo list. Then I login to the foo account and execute usermod -g MYOWNGID mylogin
answered Nov 20 at 5:32
Kemin Zhou
19115
19115
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f233614%2fwhen-trying-to-change-username-terminal-tells-me-user-is-currently-used-by-proc%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown