• Advertisement
Sign in to follow this  

Solaris, deleting user via console?

This topic is 4434 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm using solaris 10, and I have created a user via console like so: useradd -d /usr/and -m -s /bin/bash and And now I want to delete it via console, but I can't find any commands on the internet. They all refer me to the gui apps. So is there a simple command to remove users, similar to the useradd command for adding users? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I haven't used Solaris in a while, but I believe it's similar to BSD... take a look at 'man pw' and see if that helps out.

Share this post


Link to post
Share on other sites
255's right. The following is taken from the manpage of the command userdel. Enter "man userdel" in the console to see the whole manpage.

Quote:
NAME
userdel - Delete a user account and related files

SYNOPSIS
userdel [-r] login

DESCRIPTION
The userdel command modifies the system account files, deleting all entries that refer to login. If USERGROUPS_ENAB is
set to yes in /etc/login.defs, then userdel will also remove entries in /etc/group that refer to login if, and only if,
there are no members of that group listed, or the only member is login. The named user must exist.

-r Files in the user's home directory will be removed along with the home directory itself and the user's mail
spool. Files located in other file systems will have to be searched for and deleted manually.


[Edit: This is what "man userdel" gave me on a Linux box, but Solaris 10 should have the command, too.]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement