- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: shell for audit
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
10-16-2001 09:40 AM
10-16-2001 09:40 AM
1. start up ftp and connect to server myprod
2. change directory to /etc
3. from within this directory pull the passwd file to my desktip and rename it to passwd_myprod.txt
4. open the file and convert the format as the attached file
I know sed or awk can do this kind of thing, but step by step shell would be really appreciate.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2001 10:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2001 10:12 AM
10-16-2001 10:12 AM
Re: shell for audit
cat /etc/passwd | awk '{split($1,arr,":")
printf("%8s %8d %8d %20s %40s\n",arr[1], arr[3], arr[4], arr[5], arr[6])
}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2001 10:15 AM
10-16-2001 10:15 AM
Re: shell for audit
Try this.
ftp -n IP <<-EndFTP
user user_name user_password
ascii
cd /etc
get passwd
bye
EnfFTP
Then as bernie says use awk.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2001 10:45 AM
10-16-2001 10:45 AM
Re: shell for audit
Thanks for your message.
However, I may ftp from anywhere, for instance, I may ftp from A to unix box, and I want to copy the file to B, not A, how to do so?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2001 10:48 AM
10-16-2001 10:48 AM
Re: shell for audit
In ftp:
get currentfilename newfilename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2001 12:47 PM
10-16-2001 12:47 PM
Re: shell for audit
Are you saying you want to ftp from machine1 to machine2 and place the file on machine3?
You can't do that unless you use 2 ftp sessions. One to get it from machine2 to machine1 and then another to put it on machine3.
Secure shell's scp can do this however:
Example, as if issued from machine1.
(This assumes the user on machine1's public key is on both of the other machines.)
scp username@machine2:/etc/password username@machine3:/etc/password.machine2