1840255 Members
2775 Online
110162 Solutions
New Discussion

Re: user removal script

 
SOLVED
Go to solution
Brent W. Moll
Advisor

user removal script

Is there a command line script available to remove users from a server ?
2 REPLIES 2
Pete Randall
Outstanding Contributor
Solution

Re: user removal script

Brent,

Try "userdel(1M)".


Pete

Pete
Charlie Rubeor
Frequent Advisor

Re: user removal script

As the previous answer noted, "userdel login" will remove the user. The -r option will remove the home directory, but will not deal with any other files that the user owned.

A find command would locate any files that the user owned and you could then handle them as needed. Something like "find ./ -user login"