- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- To find diff ?
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
07-23-2009 01:05 AM
07-23-2009 01:05 AM
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 01:34 AM
07-23-2009 01:34 AM
Re: To find diff ?
copy the box1 /etc/passwd file to /etc/passwd_box1.And then ftp that file to box 2 and then use diff command
diff /etc/passwd /etc/passwd_box1
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 01:39 AM
07-23-2009 01:39 AM
Re: To find diff ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 01:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 01:45 AM
07-23-2009 01:45 AM
Re: To find diff ?
If you want to compare the password file try this. First take the login names from server1 using this command.
#cat /etc/passwd |cut -d: -f1 > /tmp/logins
Copy the /tmp/logins file to server2 then run these commands.
# for i in `cat /tmp/logins`
> do
> grep $i /etc/passwd > /dev/null
> if [ $? -eq 0 ]
> then
> echo "$i account is exist on the server2"
> else
> echo "$i account does not exist on the server2"
> fi
> done
It will give you the output like which account exist on the server2 and which account does not exist.
Hope it helps you
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 02:27 AM
07-23-2009 02:27 AM
Re: To find diff ?
You can get the two files and sort them. Then use comm(1) to select which:
comm -23 pwd.1 pwd.2 # users on 1 and not 2
comm -13 pwd.1 pwd.2 # users on 2 and not 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 06:44 AM
07-23-2009 06:44 AM