userdel -r question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers userdel -r question
# 1  
Old 03-15-2010
userdel -r question

I need to remove 25 obsolete users from a Solaris 9 server.

I see from the man pages that userdel -r user should do the trick.

Instead of doing them at a time, how can I string them together? My guess is:

userdel -r userA; userdel -r userB; userdel -r userC

or
userdel -r userA
userdel -r userB
userdel -r userC

Thanks in advance,
~R
Note: We don't use ldap, NIS, etc.
# 2  
Old 03-16-2010
Both are correct, but the second is more readable.


Always check the location and content of the user's home directory before issuing "userdel -r".
I've seen some classics where a user account has been created incorrectly with say "/oracle" as the home directory!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Audit useradd/userdel - Solaris 11

Linux audits in syslog, any time a user is deleted or added. However, I'm running a Solaris11 VM, and find no such entries. How can I enable auditing for useradd and userdel? Oracle's documentation on managing the auditing service, has been of no assistance. Thanks. Customizing What Is... (7 Replies)
Discussion started by: Nvizn
7 Replies

2. What is on Your Mind?

Where should I ask my question?

Hello, all I found you folks by doing searches on linux bash scripting From time-to-time I'm hoping to get help from the experts here. I'm technically competent enough with Windows to run my own Tech-Support business, but I am fairly lightwieght in Linux. Over the last 3-4 years I've... (3 Replies)
Discussion started by: Tovian
3 Replies

3. Solaris

audit useradd userdel usermod in solaris 10

the previous thread on this problem was closed with no resolution/workaround that i could see...have there been any breakthroughs? :wall: (0 Replies)
Discussion started by: lisah66
0 Replies

4. What is on Your Mind?

"she" in userdel?

I was going the userdel man page and found this... Funny? Deliberate? Mistake? Have you come across something like this? I found it funny! The author should have some grudge towards the female being. --ahamed (2 Replies)
Discussion started by: ahamed101
2 Replies

5. Shell Programming and Scripting

Using userdel -r in a script? To delete multiple users.

I'm getting ready to upgrade to Solaris 10 (from 8) and I'm trying to write a script that will delete approximately 800 user accounts that are no longer required. I'm trying to use the userdel -r command and read the input from a file with the list of user names. I've never been very good at... (3 Replies)
Discussion started by: sol10admin
3 Replies

6. Solaris

audit useradd, userdel on solaris 10

I just want to audit and log to syslog when a user is added, removed or modified from the system. According to the docs I have: #/etc/security/audit_control dir:/var/audit flags:ua minfree:20 naflags:ua plugin:name=audit_syslog.so.1; p_flags=ua But neither syslog nor auditreduce -c ua... (7 Replies)
Discussion started by: glisha
7 Replies

7. Linux

Can I `userdel root`?

If I'll creat a user with uid=0, Can I `userdel root`? (3 Replies)
Discussion started by: zylwyz
3 Replies

8. Programming

Question?

what is WDFP and WE STATION? (1 Reply)
Discussion started by: billybayou
1 Replies
Login or Register to Ask a Question