- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Delete the User with UID '0'
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО01-31-2009 01:52 PM
тАО01-31-2009 01:52 PM
Delete the User with UID '0'
I need to remove some users from the servers that are running HP-UX 11.00, 11.11 and 11.23 versions.
All the users share the same UID '0'. I have to just delete the user while I need to keep its home directory.
When I run the command : userdel username
It shows me the following message :
Login username is currently in use
When I try to do same from sam..
I shows that the user share the same UID as root, etc. Files and directories owned by this user cannot be reassigned to anyother user. Do you still want to remove the user
Yes No.
Please suggest whether it is safe to delete the user with sam. Whether it will harm anyother user/process.
Regards :
Arun Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2009 02:23 PM
тАО01-31-2009 02:23 PM
Re: Delete the User with UID '0'
I would delete this users by vipw utility. you need to know vi usage.
Hasan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2009 05:20 PM
тАО01-31-2009 05:20 PM
Re: Delete the User with UID '0'
The only "safe" way is to manually remove the users from the password file via "vipw".
If I were you, I would remove ALL non-root accounts that have UID 0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2009 02:17 AM
тАО02-01-2009 02:17 AM
Re: Delete the User with UID '0'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2009 03:15 AM
тАО02-01-2009 03:15 AM
Re: Delete the User with UID '0'
Instead you should do what Hasan & OldSchool said, use vipw, not vi directly on /etc/passwd.
(It also is easier to type. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2009 12:14 PM
тАО02-01-2009 12:14 PM
Re: Delete the User with UID '0'
I really hope that your system is only for testing. Even with a bunch of well-trained system administrators, having multiple users with UID 0 is a disaster waiting to happen. It also means that there is no accountability in case mistakes are made, and as you have seen, duplicate UID's make deleting users quite complicated.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2009 01:25 PM
тАО02-01-2009 01:25 PM
Re: Delete the User with UID '0'
As already has been stressed, use 'vipw' to delete the '/etc/passwd' entries with the duplicate uid=0. Using 'vipw' instead of doing 'vi /etc/passwd' offers some checking of the password file and will prevent you from doing some forms of damage.
Remember that this will leave files and directories the are owned by 'root' as their uid=0 is really 'root' and not the duplicated alias name. Thus, you will need to hunt down the "orphaned" files and directories. Begin by noting the home directory of the users that you are deleting. At least some, or maybe all, of the user's files can be sorted-out from there.
You should now be able to see that you had not only a security hole and a maintenance nightmare, but a disaster waiting to happen had you used SAM and specified the removal of one of the users (with a uid-0) _and_ toggled the removal of all of his/her files! [...you would have removed all of 'root's files!!! ]
Regards!
...JRF...