- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Useradd for creating system user
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
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
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
тАО08-11-2011 03:42 AM
тАО08-11-2011 03:42 AM
Useradd for creating system user
I'm trying to create a user with root privileges. I'm trying to assign "/" as the home directory for the duplicate root user roota. Already the existing root user also has "/" as the home directoy.Is it possible to assign "/" as home directory for two users with same uid?
Please let me know whether the below command works or not:
useradd -ou 0 -g 0 -s /bin/ksh -d / roota
- Tags:
- useradd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2011 03:55 AM
тАО08-11-2011 03:55 AM
Re: Useradd for creating system user
Yes, it will surely work.
Was this post useful? - You may click the KUDOS! star to say thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2011 04:01 AM
тАО08-11-2011 04:01 AM
Re: Useradd for creating system user
Hi:
Better to share the root password...
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2011 04:07 AM
тАО08-11-2011 04:07 AM
Re: useradd for creating system user
If you are doing something as dangerous having two root users, you might as well use vipw(1m), especially if using the same home directory.
That way you use vipw(1m) to remove that user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2011 06:09 AM
тАО08-11-2011 06:09 AM
Re: Useradd for creating system user
@kumar_chandel wrote:I'm trying to create a user with root privileges.
Why? As noted, using 'vipw' to replicate the root account as a renamed one is the easiest way.
*However* this is a very bad idea. You should be using SUDO or RBAC to confer the privileges you apparently need to someone or something. There are other ways, too, that are far less hazdardous then what you are trying to do.
Audits and auditors aside, what happens one day when you or your sucessor, or even a colleage, decides to delete the account, named "kumar"? Think what happens if I would do something like:
# find / -type f -user kumar -exec rm {} +
If my point isn't clear, would you do this?
# find / -type f -user 0 -exec rm {} +
Do you like rebuilding systems?
Regards!
...JRF...