linux 改变进程的user,linux – 当尝试更改用户名时,终端告诉我用户当前正被进程使用...

我试图更改我的用户名,根据建议here然后运行以下命令后:

CurrentName@HostName ~ $sudo usermod -l TheNameIWantToChange -d /home/TheNameIWantToChange -m CurrentName

终端响应:

CurrentName@HostName ~ $usermod: user CurrentName is currently used by process 2491

用户名保持不变.有人知道我怎么能解决这个问题并改变我的用户名吗?

解决方法:

引用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.

因此,您需要确保您重命名的用户未登录.

另外,我注意到你没有以root身份运行它.以root身份运行,或使用“sudo usermod”运行.

标签:linux,ubuntu,users,linux-mint

来源: https://codeday.me/bug/20190809/1629882.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值