HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- User Deletion script
Operating System - HP-UX
1834144
Members
2054
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 06:41 PM
05-13-2003 06:41 PM
Hi,
I am running HP-UX 11 and in need of a user deletion script to systematically cleanse the /etc/passwd as there are over 300 entries in there, SAM is too slow.
Many thanks
I am running HP-UX 11 and in need of a user deletion script to systematically cleanse the /etc/passwd as there are over 300 entries in there, SAM is too slow.
Many thanks
Let the fun and games begin
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 06:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 06:48 PM
05-13-2003 06:48 PM
Re: User Deletion script
Hi,
Have you taken a look at the 'userdel' command? It should do the trick for you. Just make a list of the user accounts you want to delete from /etc/passwd and then write a little script to pass them to userdel. If you make a list of account names to delete and put them in a file named users.del, you could do a little script like this:
while read DEL
do
userdel -r $DEL
done
JP
Have you taken a look at the 'userdel' command? It should do the trick for you. Just make a list of the user accounts you want to delete from /etc/passwd and then write a little script to pass them to userdel. If you make a list of account names to delete and put them in a file named users.del, you could do a little script like this:
while read DEL
do
userdel -r $DEL
done
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 08:28 PM
05-13-2003 08:28 PM
Re: User Deletion script
hi,
u can do this with userdel command. get all usernames into a file. Edit the file and delete the user names those u don't want to remove. Ex: root, lp, sys, bin etc.,
#cat /etc/passwd|cut -f 1 -d: >/tmp/passwd
for i in `cat /tmp/passwd`
do
userdel -r $i
done
Regards
u can do this with userdel command. get all usernames into a file. Edit the file and delete the user names those u don't want to remove. Ex: root, lp, sys, bin etc.,
#cat /etc/passwd|cut -f 1 -d: >/tmp/passwd
for i in `cat /tmp/passwd`
do
userdel -r $i
done
Regards
Never Say No
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP