学习linux的初学者肯定会遇到一些莫名其妙的问题,比如我,在学习删除一个用户的时候,就遇到上面的报错

userdel: user xiaoming is currently used by process 4713

,不仅是这样,在我创建这个目录的时候是成功的,但是如果我su - xiaoming 的时候发现报这个错误

No directory, logging in with HOME=/

在linux社区找到的解决办法没能解决(可能是我查资料的水平还有待提高),

这个是社区的答案,最终我在csdn上找到和我类似的问题,并解决之。

办法是:

我个人推测是在root用户下su 切换到xiaoming用户,然后在xiaoming用户下又切换回root,但是xiaoming用户还被某个进程占用着,所以进程不死,用户del不掉。

所以我们在命令行中使用Ctrl+D 来退出当前的登录,然后在按一次Ctrl+D退出xiaoming用户的登录,这时候我们回到的是root的用户下了,在使用

userdel -r xiaoming

就可以顺利删除xiaoming这个用户啦

同时放上删除用户和添加用户的命令,以后不会可以方便查看

删除:

终端方法:以下用newuser代替想要删除的用户账户
在root用户下:userdel -r newuser
在普通用户下:sudo userdel -r newuser
因为需要彻底删除用户,所以加上-r的选项,在删除用户的同时一起把这个用户的宿主目录和邮件目录删除。

添加:sudo adduser newuser

linux【报错】userdel: user xiaoming is currently used by process 4713解决的更多相关文章

  1. 报错——userdel: user hhh is currently used by process 9218

    报错 userdel: user hhh is currently used by process 9218 [root@centos71 ~]# useradd hhh [root@centos71 ...

  2. 64位linux报错Could not initialize class java.awt.image.BufferedImage

    最近碰到一个问题: 64位linux报错Could not initialize class java.awt.image.BufferedImage 在WIN平台下运行正常BufferedImage ...

  3. Linux报错之ping: www.baidu.com: Name or service not known

    Linux报错之ping: www.baidu.com: Name or service not known 出现这个以后,首先去ping下主机Ip,发现能ping通,但是出现另一个问题Destina ...

  4. Linux报错

    Linux报错 ------------------- 在VMware虚拟机中配置yum源时,执行 mount /dev/cdrom /mnt/cdrom 出现 mount: no medium fo ...

  5. FXP登录Linux报错

    1.用FXP登录Linux报错: [info] subsystem request for sftp failed, subsystem not found.[右] [execute] /usr/li ...

  6. linux 报错:E: Package 'libmemcached' has no installation candidate

    linux 报错:E: Package 'libmemcached' has no installation candidate 网上查资料说是软件安装源没有这个软件,需要添加软件源. 1.备份源列表 ...

  7. win7 X64 使用VS2008 ->编译报错LINK : fatal error LNK1000: Internal error during Incr的解决

    编译报错LINK : fatal error LNK1000: Internal error during Incr的解决 Win7 旗舰版 Microsoft Visual Studio 2008 ...

  8. pip运行报错Fatal error in launcher: Unable to create process using pip.exe

    使用pip的时候报错Fatal error in launcher: Unable to create process using pip.exe 解决办法,升级pip python -m pip i ...

  9. pip3命令报错Fatal error in launcher: Unable to create process using '"d:\old_files\py3.6\python.exe" "E:\py3.6\Scripts\pip3.exe" list'

    cmd输入pip3 list命令报错 Fatal error in launcher: Unable to create process using '"d:\old_files\py3.6 ...

随机推荐

  1. Fast Intro To Java Programming (2)

    Java局部变量 局部变量声明在方法.构造方法或者语句块中: 局部变量在方法.构造方法.或者语句块被执行的时候创建,当它们执行完成后,变量将会被销毁: 访问修饰符不能用于局部变量: 局部变量只在声明它 ...

  2. SqlServer修改数据库文件及日志文件存放位置

    --查看当前的存放位置 select database_id,name,physical_name AS CurrentLocation,state_desc,size from sys.master ...

  3. Uploadify 3.2使用

    我今天介绍的Uploadify 3.2的,以前旧版本的并不适用,说到这个,我就火大,我也是第一次使用,也百度了下使用手册,结果坑爹的那些手册都是旧版的,新版的Uploadify接口和旧版的差太多了.废 ...

  4. android 源码编译中的错误 解决

    1.编译种错误提示: arm-none-linux-gnueabi-gcc: directory: No such file or directory arm-none-linux-gnueabi-g ...

  5. mysql注册服务

    http://www.2cto.com/database/201301/185456.html ____________________________________________________ ...

  6. Hibernate配置文件——hibernate.cfg.xml

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuratio ...

  7. Struts2运行流程分析

    一.Struts2运行流程图: 二.运行流程分析: 1. 请求发送给StrutsPrepareAndExecuteFilter 2.StrutsPrepareAndExecuteFilter询问Act ...

  8. HDU 5842 Lweb and String (水题)

    Lweb and String 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5842 Description Lweb has a string S ...

  9. poj1459

    初涉网络流.改日再写一些概念性的介绍. ek算法可作为模板使用. #include <iostream> #include <queue> using namespace st ...

  10. getopt使用例子

    getopt是linux下获取程序启动参数的函数        #include <unistd.h> int getopt(int argc, char * const argv[], ...