- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to change the root equal id UID in hp-unix
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
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
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-03-2017 12:32 PM
01-03-2017 12:32 PM
how to change the root equal id UID in hp-unix
we already created the root equal user ID(test) now we need to change the UID (tets) .
what is the procedure . if change the UID(test) , if their is any effect in root account. please confirm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2017 02:03 PM
01-03-2017 02:03 PM
Re: how to change the root equal id UID in hp-unix
>> created the root equal user ID
Created what? What is a "root equal user ID"? Are you using something like RBAC or something? Can you please elaborate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2017 06:12 PM
01-03-2017 06:12 PM
Re: how to change the root equal id UID in hp-unix
Are you saying that you created another root user (which is a user with UID=0)? If so, this is a very bad idea. It creates many very bad scenarios that you may not have understood. You need to read about the program sudo and how to allow selected users access to specific root commands. Here is a useful discussion about duplicate UID 0 accounts:
https://community.hpe.com/t5/System-Administration/Duplicate-root-user/td-p/3591386
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2017 06:23 AM
01-04-2017 06:23 AM
Re: how to change the root equal id UID in HP-UX?
You are trying to remove the root capabilities for user test?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2017 10:20 AM
01-10-2017 10:20 AM
Re: how to change the root equal id UID in HP-UX?
yes you are right.
we have already created test user .
now the root and test user have same UID that is 0
so now i want to remove the test user account. if i remove the test user account we can expect any performance issue in server ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2017 02:18 PM
01-10-2017 02:18 PM
Re: how to change the root equal id UID in HP-UX?
The important question is: how did you remove the extra root user? Whatever you do, NEVER remove a UID 0 user with sam. Early versions of sam would ask you if you want to also remove all the files owned by this user. If you say yes, EVERY file owned by UID 0 will be removed...which destroys the entire computer!
Since you said you have already removed the duplicate root user, I assume that your system has not crashed and is still running.
The UID 0 alias, as mentioned before is a very bad idea, but it seems that you have rectified the situation. So there should not be any performance issue.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2017 09:14 AM
01-27-2017 09:14 AM
Re: how to change the root equal id UID in hp-unix
You could also use sudo which is a better way to control privileges. As the last commentor mentioned it's bad practice, to have duplicated UID's of zero. You can install sudo via HP-UX Internet Express components for HP-UX 11i v3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 09:17 AM
05-19-2017 09:17 AM
Re: how to change the root equal id UID in HP-UX?
This is an example of a "c wrapper" I cobbled together for one of our lp scripts. We don't have sudo installed on our OS and wanted a way to evelvate a user when it is called from our db to modify our printers from a web portal. You could maybe use this idea with setresuid to change it's real ID and remove it in the same process? Hope that helps.. I've never been in that spot before.
/* real uid root wrapper for adding printers */ #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <errno.h> int main( int argc, char *argv[] ) { char String[255]; setresuid(0,-1,-1); sprintf(String, "addqueue -i 5 -h %s -q %s -r off -t off -L AUTO -D on -b off", argv[1], argv[2]); system(String); return 0; }
"... I pass the hated wasteland with a grin, cause in the end I got my passions." -Aesop Rock