- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: root passwd
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
Forums
Discussions
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
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
12-13-2001 01:33 AM
12-13-2001 01:33 AM
Just came to know with a starnge discovery....would like ur comments on the same.
If I created a login with uid "0" say toor and after logging with this "toor" id if I am going to change the passwd with only "passwd" command, it changes the root passwd also. Is it so? how to restrict?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:38 AM
12-13-2001 01:38 AM
Re: root passwd
I am assuming the proble here is that you have some utility which allows non-root users to add users to the system/change passwords etc. Any utility which allows you to do this, should prevent the assignment of UID 0 for a new user, and prevent the change of passwords for any account with UID 0.
If the problem is others who do not understand this who have access to the root account to create/change accounts - well you have a bigger problem!
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:41 AM
12-13-2001 01:41 AM
Re: root passwd
The superuser root account also uses the uid of 0. A superuser, whose effective user ID is zero is allowed to change any password and is not forced to comply with password aging.
Hope I interpreted your question correctly and this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:41 AM
12-13-2001 01:41 AM
Re: root passwd
It's me only who has created this "toor" login, equivalent root id. So that if something goes wrong with root , I may not die.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:41 AM
12-13-2001 01:41 AM
Re: root passwd
Make sure your /etc/passwd file reflects this correctly, or you're just asking for trouble.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:49 AM
12-13-2001 01:49 AM
Re: root passwd
Of course it won't work if you are running as a trusted system.
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 01:56 AM
12-13-2001 01:56 AM
Re: root passwd
But if I am login into the system with id "toor" and then issuing "passwd" command why is it changing the passwd for "root" and not specifically for "toor" id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 02:05 AM
12-13-2001 02:05 AM
SolutionHTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 02:06 AM
12-13-2001 02:06 AM
Re: root passwd
This is because the 'passwd' command is not based on the username but on id of the user.
Actually, usernames is just the 'friendly' part of the SO, all operations should be done based on id of the user. Most of the programs do so.
E.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 02:08 AM
12-13-2001 02:08 AM
Re: root passwd
I gotta it.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2001 02:25 AM
12-13-2001 02:25 AM
Re: root passwd
This is from the man pages:
man passwd:
The passwd command modifies the password as well as the attributes associated with the login name. If name is omitted, it defaults to the invoking user's login name, which is determined using getlogin(3C).
man getlogin:
The getlogin() function can be used in conjunction with getpwnam() to locate the correct password file entry when the same user ID is shared by several login names.
If passwd uses getpwnam () (I am not sure if it uses it), then given that the user ID (uid) is 0 and is shared by several login names (ie. root and toor), then getpwnam () should return the correct passwd file entry for toor.
Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com