We all know that Linux can delete users and groups by using the userdel command, but sometimes it will not be deleted. In this case, you can try to use other commands for processing. The following small series will introduce you to Linux. Using userdel can't delete the user's solution.
situation:
Generally, we removed the user is first removed from the group, and then followed the group deleted, but here there is a problem:
root@ www.linuxidc.com :/home/crper# userdel -r test1
userdel: user test1 is currently used by process 1
root@ www.linuxidc.com :/home /crper# groupdel work1
groupdel: Cannot remove the primary group of the user<;test1”
Deleting the user reminds the user that the current process is running, and deleting his group also reports an error.
Solution:
You can use the vipw command:
root@ www.linuxidc.com :/home# vipw
Find the user you created earlier. Delete the line with dd (remember to save: wq or :x).
root@ www.linuxidc.com :/home# vipw -s
Find the group to which the user belongs, and also dd to kill (remember to save: wq or :x)
There is only one reason to use vipw -s, that is, you must ensure the consistency of the data, otherwise it may cause system crashes and other issues.
Command Solution:
root@ www.linuxidc.com :/home# vipw --help
Usage: vipw [options]
Options :
-g, --group Edit group database
-h, --help Display this help and launch
-p, --passwd Edit passwd database< Br>
-q, --quiet Quiet mode
-R, --root CHROOT_DIR chroot to directory
-s, --shadow Edit shadow or gshadow database
The above is the way Linux can not delete users and groups using userdel. This article uses the vipw command instead of the userdel command to delete users. If you want to know more about the usage of the userdel command, see how to use userdel in the Linux home. delete users.
In the KDE desktop environment of Ubuntu system, many users will encounter flashbac
Docker is an open source project because it doesnt have the limitations of language
The so-called dynamic ip refers to the DHCP service. If you do not need to manually set the IP addre
A lot of software under Linux needs to be released as a source package. It is very troublesome to in
RedHat6.5 network card common problems and solutions
Steps to install IEs4Linux on Ubuntu 12.04
How do Linux systems delete icons on the gnome panel?
What should I do if the Shell command cannot be used after the Linux system is installed?
Linux vsftp prompt 530 Permission denied how to do?
Ubuntu how to modify the command prompt PS1
How Linux prohibits specific ip address access
How to recover after the fstab file is lost under Linux?
How to choose qcow2 and raw image format for Linux system
Debian boot does not enter the graphical interface method
How Linux uses the OpenSSL command line
How to install different versions of Linux system on the same computer
iTunes prompt 3194 Unknown error solution
How to solve the system file "Access Denied" in Windows 8
How to set up Win10 with Explorer to open this computer shortcut
Win7 Control Panel Three Functions Application Skills
Win10 system IE browser how to prohibit webpage playback sound
Modify the 2k/XP default refresh rate with the registry
How to do win8.1 sleep network? How to cancel the computer sleep network
Window7 computer no sound, suggesting that no audio output device is installed
Reset Windows 7 Network Settings
The serial number is incorrect. Cannot install Win2003 SP1. Solution