Operating System - HP-UX
1833847 Members
2056 Online
110063 Solutions
New Discussion

Re: multiple ID's with UID 0

 
Mark Harshman_1
Regular Advisor

multiple ID's with UID 0

I have a sever, that has about 4 ID's with UID of 0. I want to remove these (except root of course) and wanted any warnings of recommendations for gotchyas. This is on a HPUX 11i server, running in Trusted mode. Thanks
Never underestimate the power of stupid people in large groups
7 REPLIES 7
Todd McDaniel_1
Honored Contributor

Re: multiple ID's with UID 0

dont do a recursive userdel -R

it will remove all files owned by that user...doh!!!

could be very bad...


go remove files and dirs individually
Unix, the other white meat.
RAC_1
Honored Contributor

Re: multiple ID's with UID 0

/usr/sbin/logins -d

will show duplicate ids. Check the user names and delete those users. (userdel/sam/vipw)

Run authck and logins -d after it.

Having more than one user with uid 0 is a very very bad thing. (At most two root users. so that in case required)

Anil
There is no substitute to HARDWORK
Todd McDaniel_1
Honored Contributor

Re: multiple ID's with UID 0

oops lower case -r not -R...
Unix, the other white meat.
Ken Penland_1
Trusted Contributor

Re: multiple ID's with UID 0

I remember having to do this way back a few years ago...if I remember correctly, it wont really hurt anything to remove those accounts, but you may have a problem actually removing them by normal means...using something like userdel or sam won't let you do it I dont think because it will check to see if any procs are in use by that user, so it will check for UID 0, which it will obviously find some. so you will prob have to manually edit the password file and auth file to change the UID before deleting the account.
'
Sundar_7
Honored Contributor

Re: multiple ID's with UID 0

Todd was right on ! dont use the -r option with userdel and you should be good to go.

Or the safest way would be to use the vipw command and delete the entries manually.
Learn What to do ,How to do and more importantly When to do ?
Todd McDaniel_1
Honored Contributor

Re: multiple ID's with UID 0

thanks Sundar...

Now if I can just get my wife to say that "todd is right"

hehe


no points for this post.
Unix, the other white meat.
Mark Harshman_1
Regular Advisor

Re: multiple ID's with UID 0

thanks to all for the replies.
Never underestimate the power of stupid people in large groups