usermod: user XXX is currently logged in 报错处理
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了usermod: user XXX is currently logged in 报错处理相关的知识,希望对你有一定的参考价值。
修改用户账号时候报错
[[email protected] /]# usermod -s /bin/bash -d /home/z -g srd 678
usermod: user 678 is currently logged in
1查询用户678有哪些进程
[email protected] /]# ps aux |grep 678
root 24678 0.0 0.0 108336 1800 pts/1 S Jan22 0:00 bash
root 32868 0.0 0.1 161440 1972 pts/1 S 14:30 0:00 su 678
678 32869 0.0 0.0 108340 1588 pts/1 S 14:30 0:00 sh
root 33427 0.0 0.0 103252 864 pts/1 S+ 16:05 0:00 grep 678
2KILL掉,其中-s 9 制定了传递给进程的信号是9,即强制、尽快终止进程
[[email protected] /]# kill -s 9 32869
[[email protected] /]# [[email protected] /]#
3.再次查询用户678有哪些进程,检查是否KILL成功
[[email protected] /]# ps aux |grep 678
root 24678 0.0 0.0 108336 1800 pts/1 S Jan22 0:00 bash
root 33433 0.0 0.0 103252 864 pts/1 S+ 16:07 0:00 grep 678
[[email protected] /]# usermod -s /bin/bash -d /home/z -g srd 678 修改用户,不再报错了
[[email protected] /]#
[[email protected] /]# tail -5 /etc/passwd
555:x:504:506::/home/555:/bin/bash
666:x:505:500::/home/z:/bin/sh
PD2913:x:506:509::/home/PD2913:/bin/bash
456:x:507:510::/usr/456:/bin/bash
678:x:508:500::/home/z:/bin/bash 修改成功
以上是关于usermod: user XXX is currently logged in 报错处理的主要内容,如果未能解决你的问题,请参考以下文章
mybatis Column 'XXX' in where clause is ambiguous 错误
Hibernate 中出现表名(XXX) is not mapped 问题