- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script to compare and update discrepancy within tw...
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
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
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-27-2001 12:28 AM
тАО03-27-2001 12:28 AM
Script to compare and update discrepancy within two text file
I want to update the password field of the password file in one host by comparing with another host based on the login name.
If Awk can perform this, how should it go about as I normally use Awk to process single text file ? If not, what is the best tool to use ?
Thanks in advance,
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2001 03:09 AM
тАО03-27-2001 03:09 AM
Re: Script to compare and update discrepancy within two text file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2001 03:16 AM
тАО03-27-2001 03:16 AM
Re: Script to compare and update discrepancy within two text file
If you need to replicate users between systems, you should check something about the product NIS+
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2001 03:16 AM
тАО03-27-2001 03:16 AM
Re: Script to compare and update discrepancy within two text file
if you want to synchronize passwords between two servers you should consider using NIS+ (The Yellow Pages).
Fooling around with the passwd file is certainly not recommended.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2001 06:58 PM
тАО03-27-2001 06:58 PM
Re: Script to compare and update discrepancy within two text file
Are you using HP-UX trusted? Because if you are, the passwords would be shadowed in /tcb/files/auth/*. The script has to be tailored differently for an untrusted and a trusted system.
If you are uneasy with perl, the next best thing is using sed to perform password substitution.
If you are using untrusted HP-UX which has its encrypted passwords residing within /etc/passwd. For each userid in the new password file eg. /etc/passwd.new, if this same userid exists in /etc/passwd, then replace the password field in /etc/passwd.new with the password field in /etc/passwd for this particular user.
If you are using trusted HP-UX, For each userid in the new password file, you have to extract the 1st letter of the userid, cd to your new tcb directory ie. /tcbnew/files/auth/s (where s is the first letter of the userid), extract the encrypted password from the u_pwd field of the userid eg. /tcb/new/files/auth/s/steven and replace the password in the corresponding /tcb/files/auth/s/steven of the original tcb directory.
For passwords which are asterisk'ed ie. *, you have to take special care in your scripting that it does not get treated like a wildcard and result in undesirable results.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com