Operating System - HP-UX
1752780 Members
6490 Online
108789 Solutions
New Discussion юеВ

Re: User with Admin Rights

 
SOLVED
Go to solution
Suriya Prakash
Regular Advisor

User with Admin Rights

Hi,

I want to create a user with admin rights.
I dont want to use root for all the cases.
I need a user with all admin rights.
The user can able start and stop the application, start and stop the oracle packages, shutdown or restart the server, etc..
pls guide me....

Thanks,
Suriya
41 REPLIES 41
Jayakrishnan G Naik
Trusted Contributor
Solution

Re: User with Admin Rights

Hi Suriya,

You can do this by creating another user with uid 0.

There is an option "-o" for creating users with non unique user ids

useradd
-o Allow the UID to be non-unique (that is, a duplicate).

Hope this helps.... if helpful give appropriate points.

Thanks & Regards
Jayakrishnan G Naik
Suriya Prakash
Regular Advisor

Re: User with Admin Rights

Hi,

Thanks for the reply.

If i create the user with the id 0.

what about the root user with id 0.

and tell me the full command to create the user with admin rights bcoz i'm new to unix.

Thanks,
Suriya.
Jayakrishnan G Naik
Trusted Contributor

Re: User with Admin Rights

Hi Suriya,

# useradd -u 0 -o -g (group id) -d /home/user -m -s /bin/sh username

-u uid
-g gid
-d home directory
-m create the home directory for the new login
-s login shell

set the values for "(group id), /home/user , /bin/sh , username " etc depending on your need and environment.

>>New to unix
Manpages for the commands are always useful, and you can develop a habit to read manpages which can solve many doubts.

Thanks & Regards
Jayakrishnan G Naik
Suriya Prakash
Regular Advisor

Re: User with Admin Rights

Thanks Jayakrishnan,

If i create the user with uid 0.

the root user will take which uid.

Thanks,
Suriya.
Jayakrishnan G Naik
Trusted Contributor

Re: User with Admin Rights

Hi Suriya,

root user always use uid 0 and the -o option allows you to use duplicate uid
for another user. It means you can create multiple users with same uid.


Please read my first reply which clearly tells what more on the option
" -o"

Please assign appropriate points to the replies.

Thanks & Regards
Jayakrishnan G Naik
Suriya Prakash
Regular Advisor

Re: User with Admin Rights

Thanks Jayakrishnan.

Dennis Handly
Acclaimed Contributor

Re: User with Admin Rights

Instead of two superusers, you may want to look into sudo or RBAC that allow other users to do a carefully tailored list of root tasks.
Suriya Prakash
Regular Advisor

Re: User with Admin Rights

Hi,

I try the two super user option, it was not working. its not able to process even the swlist command. Pls tell me to configure sudo or RBAC which one is better.

Thanks,
Suriya.
Dennis Handly
Acclaimed Contributor

Re: User with Admin Rights

>I try the two super user option, it was not working.

This can't fail if you set it up correctly. If not trusted, vipw(1m) can do it. What does id(1) show?

>tell me to configure sudo or RBAC which one is better.

You need to download both, one form the porting center and one from HP.
You can search for more threads on the two:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=805956
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1238372