- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to create a local user with "root" access
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
Forums
Discussions
Discussions
Discussions
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
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
05-29-2006 10:10 PM
05-29-2006 10:10 PM
I need to create a local user which has root access to run some root related commands like "powermt" etc.
please suggest how to create this user named "root_user"?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2006 10:14 PM
05-29-2006 10:14 PM
Re: how to create a local user with "root" access
Best solution is to create a normal user and install/configure sudo to add some root privileges to this user.
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.8p12/
Otherwise you could add a user with uid 0 but this is not advised.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2006 10:27 PM
05-29-2006 10:27 PM
Re: how to create a local user with "root" access
i think you asked a question before like this. weren't you able to get a result ?
1. download and install sudo first.
2. then add root_user.
3. run visudo.
4. if you want this user run all root commands.
add a line like:
root_user ALL = (ALL)NOPASSWD: ALL
or you can just write the command that he can run. (see other thread)
but he will still have path related problems. and he can't run commands. you can add the directories which contain executables to root_user's path.( in .profile file in his home directory)
like /usr/sbin and /sbin. or if executable is in another directory you must add it.
or he can run commands using the full path.
hope it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2006 10:28 PM
05-29-2006 10:28 PM
Re: how to create a local user with "root" access
See "sam -r".
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2006 11:08 PM
05-29-2006 11:08 PM
Re: how to create a local user with "root" access
It'll create a user with root priviledges.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2006 12:07 AM
05-30-2006 12:07 AM
SolutionDo *not* create multiple uid=0 entries!
It matters not what you call the entity. A uid=0 confers superuser privilege.
However, should your (or someone else) ever do:
# find / -user root_user -exec rm -rf {} \;
...or anything like it, thinking that they wiil remove anything owned by 'root_user'...
...or simply use SAM to remove 'root_user' and toggle the option to remove the user's files...
*ALL* files owned by uid=0 will be removed. I hope at that point you have a viable Ignite image of your server.
As noted, use 'sudo' or Restricted SAM, or even write a setuid=root C-code wrapper for the commands that you need root privilege to execute.
Regards!
...JRF...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2006 02:50 AM
05-30-2006 02:50 AM
Re: how to create a local user with "root" access
# /usr/sbin/visudo
User_Alias ROOT_USERS = root_user1
Cmnd_Alias SECURE = /sbin/powermt
ROOT_USERS ALL=SECURE
:wq!
The above will create a ROOT_USERS group that you can add or remove people from and gives them explicit access to the command alias group SECURE, which is one command. Password is asked every time, and hence, logged via syslog.
I do this on all of my machines if people need root access. If they need custom scripts, I also audit or write them myself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2006 02:53 AM
05-30-2006 02:53 AM
Re: how to create a local user with "root" access
Other options are 'sudo' (which is available from software.hp.com) and PowerBroker (a cost product)
These will allow specified users the ability to run commands as root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 11:11 PM
05-31-2006 11:11 PM
Re: how to create a local user with "root" access
i have updated sudoers file using #visudo command and added these entry
#visudo
User_Alias ROOT_USERS = acxmrt
Cmnd_Alias SECURE = /sbin/powermt
ROOT_USERS ALL = SECURE
:wq!
now i am trying with "acxmrt" user to run the "$powermt save" command but it is giving this error:
$ /sbin/powermt save
sh: /sbin/powermt: Execute permission denied.
I have tried also in visudo with these options:
#visudo
acxmrt ALL = (ALL) NOPASSWD: ALL
#visudo
acxmrt ALL = (ALL) NOPASSWD: /sbin/powermt
#visudo
acxmrt ALL = (root) NOPASSWD: /sbin/powermt
but still i am not able to run "powermt save" command using my local user "acxmrt"
please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2006 12:45 AM
06-01-2006 12:45 AM
Re: how to create a local user with "root" access
# chown root /sbin/powermt
# chmod u+s,o+x /sbin/powermt
# ll /sbin/powermt
-r-sr-xr-x 1 root bin 561152 Nov 9 2004 /sbin/powermt
With one user (no root):
?/sbin/powermt display
Symmetrix logical device count=180
CLARiiON logical device count=0
==============================================================================
----- Host Bus Adapters --------- ------ I/O Paths ----- ------ Stats ------
### HW Path Summary Total Dead IO/Sec Q-IOs Errors
==============================================================================
15 0/4/0/0.33.25.19.0 optimal 6 0 - 0 0
17 0/2/0/0.33.25.19.0 optimal 6 0 - 0 0
19 0/4/0/0.33.25.19.1 optimal 24 0 - 0 0
20 0/2/0/0.33.25.19.1 optimal 24 0 - 0 0
25 0/4/0/0.98.15.19.0 optimal 102 0 - 0 0
26 0/2/0/0.98.15.19.0 optimal 102 0 - 0 0
29 0/4/0/0.33.25.19.3 optimal 44 0 - 0 0
rgs,
ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2006 01:15 AM
06-01-2006 01:15 AM
Re: how to create a local user with "root" access
You must preface any command you want to run via sudo, with sudo. To run your powermt you must do:
$ sudo /sbin/powermt save
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2006 08:01 PM
06-08-2006 08:01 PM
Re: how to create a local user with "root" access
I have added these lines in sudoers files:
User_Alias FULLSUDO = sestj , serab, sebos, seglb, searj, semab, sejos, prkeg
FULLSUDO ALL=(root) NOPASSWD: ALL
please let me know are these users (sestj , serab, sebos, seglb, searj, semab, sejos, prkeg) able to run all the commands including #passwd command (to change the root password)
can they change the root password?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2006 10:54 PM
06-08-2006 10:54 PM
Re: how to create a local user with "root" access
I have added these lines in sudoers files:
User_Alias FULLSUDO = sestj , serab, sebos, seglb, searj, semab, sejos, prkeg
FULLSUDO ALL=(root) NOPASSWD: ALL
thanks