- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: modify password file
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
03-13-2002 01:24 PM
03-13-2002 01:24 PM
modify password file
Plan A is to change passwd file by copying passwd as passwd.new and directly modify the field and then copy back as passwd file.
In this scenario
-What happens if users are already logged in..?
-Does it effect /tcb/auth Files ?
Plan B use usermod -c option
in this scenario if user logged in I can not modify any fields.
What would be the best way to do this.??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2002 01:29 PM
03-13-2002 01:29 PM
Re: modify password file
Try the vipw command.
Hope this helps
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2002 01:30 PM
03-13-2002 01:30 PM
Re: modify password file
usermod is a better way to do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2002 02:01 PM
03-13-2002 02:01 PM
Re: modify password file
I'd go with the last comment. At the end of the day all your changing id the comment field
usermod -c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2002 11:17 PM
03-13-2002 11:17 PM
Re: modify password file
i agree with the others, the better way seems to be to use the command:
usermod -c new_comments username
If you have a lot of users you can easily put this in a script: (if you need different comments you have to take care to get the correct values with variables ... )
for i in $*
do
usermod -c new_comment $i
done
Using vi- editor to do this job is also possible, but allways use the command:
vipw /etc/passwd
This command locks the file while you are editing it. So if any user trys to change his password during your operation he gets a message that the file is locked, and his action is forbidden.
The comment field was used by several services in the past, but in these days it is not that important as it was, so: NO, doesn't effect users.
The shadow- password files are a security feature. Users who login are checked from system if username and password are correct. Without shadow- files, /etc/passwd is read to confirm the username and password. With shadow- files this information is read out of shadow files. ( These are only readable for root, but not for the users... ) So: No, doesn't take effect on the shadow- files either.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 01:09 AM
03-14-2002 01:09 AM
Re: modify password file
Since itis just a comment field change.
I have done this for root in a trusted system in all the methods mentioned in your note
I could do it without any issue.
/tcb/auth file is not affected.
-Vijay