Operating System - HP-UX
1822004 Members
4126 Online
109639 Solutions
New Discussion юеВ

Re: creating the user with the uid '0'

 
SOLVED
Go to solution
gany59
Regular Advisor

creating the user with the uid '0'

how to create the multiple users with the id '0'.
Root is also the user owning the uid '0'.

could any body tell me how to create it ?

Thanks in advance
17 REPLIES 17
Michal Kapalka (mikap)
Honored Contributor
Solution

Re: creating the user with the uid '0'

hi,

that it's not possible, because each user must have unique ID, but you could asign a special group to the specified users, or use sudo for example.

mikap
Johnson Punniyalingam
Honored Contributor

Re: creating the user with the uid '0'

>>how to create the multiple users with the id '0'.
Root is also the user owning the uid '0'.

could any body tell me how to create it ?<<



It depends of what purpose you are willing do ?

you can perform above safe and secure by "sudo"

Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: creating the user with the uid '0'

Check Below Thread, for more information on

Installation of Sudo and Configuration

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1259648615352+28353475&threadId=1237439
Problems are common to all, but attitude makes the difference
Steven Schweda
Honored Contributor

Re: creating the user with the uid '0'

A Forum search for
uid 0
should find many old threads on this topic,
most of which seem to advise against doing
it.
Venkatesh BL
Honored Contributor

Re: creating the user with the uid '0'

You could as well give the root passwd to that user! :)

Kapil Jha
Honored Contributor

Re: creating the user with the uid '0'

not a good idea to make user with userid '0'

well youcan not create it, but you can change it later in passwd file and that user would behave like root.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Nido
Trusted Contributor

Re: creating the user with the uid '0'

>>>>how to create the multiple users with the id '0'.
>>>>Root is also the user owning the uid '0'.

Please forgive your poor machine ;-) and install sudo with appropriate priviledges to specific users.

>>>>could any body tell me how to create it ?
You can manually change uid to 0 after user account creation but its highly NOT-RECOMMENDED.

Cheers!!
" Let Villagers Be Happy!! "
gany59
Regular Advisor

Re: creating the user with the uid '0'

Hi folks,

for giving the root permission to the some users . it is needed..
Kapil Jha
Honored Contributor

Re: creating the user with the uid '0'

NO its not needed[user_id 0] to give root permission.

Thats what people are talking about here is to install sudo which would give only necessary access to another user.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Dennis Handly
Acclaimed Contributor

Re: creating the user with the uid '0'

>for giving the root permission to the some users

As others have mentioned, this is not a good idea security-wise.

But if you really really want it, you can use vipw(1m) to add them. And use vipw to remove them.
Javed Khan_1
Valued Contributor

Re: creating the user with the uid '0'

Hi,

Any user with udi 0 is superuser

just add -o (Allow the UID to be non-unique) along with useradd and uid 0.

However better option is to install sudo , this will also give you to assign users to execute limited command by root users.

Javed
Never Give Up
OldSchool
Honored Contributor

Re: creating the user with the uid '0'

I'd suggest you search the forums for "uid 0" as noted above to find the reasons why this a *very* bad idea....including the possiblitiy of rendering your system unusable.

If you've made them UID = 0, you might as well give them the root password, as that's probably safer.

you should consider using su or sudo or PowerBroker or ???

If you're subject to security audits, or things such as SOX or PCI requirements, you'll get clobbered if they find this
James R. Ferguson
Acclaimed Contributor

Re: creating the user with the uid '0'

Hi:

To underscore OldSchool's sage advice I would urge you to read this thread to understand one "nightmare":

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1309715

Simply because you _can_ do something doesn't mean that you _should_. Don't replicate uid=0.

Regards!

...JRF...
Doug Burton
Respected Contributor

Re: creating the user with the uid '0'

I have to agree with everyone else here. Install/config SUDO or give the "users" the root password (I cringe when I type that).

You don't talk about why the users need root. Maybe they really need it however I have found that people that NEED root to do there job are not doing it well, correctly, whatever way you like to say it.

Perhaps SUID needs to be set on the file(s) they are using?

In any case it would be nice to know why they need root.
Patrick Wallek
Honored Contributor

Re: creating the user with the uid '0'

>>>In any case it would be nice to know why they need root.

Probably more like: In any case it would be nice to know why they **THINK** they need root.

The other way to look at this is if you give out the root password, or create multiple UID 0 accounts, guess where the fingers will point **WHEN** something catastrophic happens.

With multiple UID 0 accounts it is not a matter of **IF** something bad will happen, but **WHEN** something bad will happen.

If your users are anything like some users I have dealt with, they will NOT take responsibility for doing something stupid that crashes the system. "No, it couldn't have been ME!!" will be heard a LOT! Then the fingers will start pointing, and ultimately the blame will fall to you since you are the system administrator.

Is that what you want to happen? I doubt it!

You need to find out what the users **REALLY** need and then use something like sudo to fulfill that need.
Bill Hassell
Honored Contributor

Re: creating the user with the uid '0'

> Root is also the user owning the uid '0'.

Actually, root (and any other user id like bill or jimmy) does not 'own' a uid. User names are only for humans because numbers are hard to remember. The user name you see for uid 0 is the first match in the passwd file. If you put bill (with uid 0) first, then all uid 0 files would appear to be owned by bill. But really, they have an ownership of 0 and that is all.

As has been mentioned, multiple uid 0 users is a very, very bad idea. Not only does it compromise security, but you are giving possibly untrained users the ability to completely destroy your system with one command. And someday, you or one of your uid 0 users may want to remove files owned by bill or owned by jimmy and you end up removing every file owned by uid 0 -- thus destroying your system.

Use this command to see how many uid numbers have been compromised:

logins -d

For safety and security, there should be no output from this command.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: creating the user with the uid '0'

>Bill: may want to remove files owned by bill or owned by jimmy and you end up removing every file owned by uid 0

Using vipw(1m) to remove the user wouldn't have that problem.