how do delete a user from command line

admin0

Verified User
Joined
Nov 14, 2008
Messages
23
While deleting an user, ( due to root doing cd in the folder) a user was not deleted properly. He does not have a home directory, but appears as a zombie in the UI not allowing me to click or do anything. Screenshot attached.

How do I delete the user/entry ?
 

Attachments

  • Screenshot from 2020-07-12 23-41-20.png
    Screenshot from 2020-07-12 23-41-20.png
    19.7 KB · Views: 190
You can try adding the user again or if that can't be done remove the the user files from /usr/local/directadmin/data/users and remove the show_all_users_cache from /usr/local/directadmin/data/admin and delete the user from /etc/passwd, /etc/shadow, /etc/gshadow, and /etc/group.

Then add the user again and remove to get everything else.
 
You can try adding the user again or if that can't be done remove the the user files from /usr/local/directadmin/data/users and remove the show_all_users_cache from /usr/local/directadmin/data/admin and delete the user from /etc/passwd, /etc/shadow, /etc/gshadow, and /etc/group.

Then add the user again and remove to get everything else.
This way ...

 
This way ...


I think this one should be included in directadmin CLI command.

Example, we can trigger this:

da-cli --remove-user <username>

Please vote this: https://feedback.directadmin.com/b/feature-requests/include-directadmin-cli-commands/
 
i seem to have problem deleting the domain, i assume the domain must still be somewhere right?
 
Back
Top