- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ftp scripts
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
09-04-2001 11:38 AM
09-04-2001 11:38 AM
ftp scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 11:45 AM
09-04-2001 11:45 AM
Re: ftp scripts
you could create a .netrc file in your home directory (permissions should be 400 (chmod 400 .netrc)
Include this in your .netrc file
/Begin
machine
/End/
eg:
machine 192.168.10.1 login user1 password welcome
-HTH
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 11:46 AM
09-04-2001 11:46 AM
Re: ftp scripts
A .netrc file must have permissions of 600 (rw for the owner ONLY) and be created in the owners home directory.
The syntax is:
machine mickey login minnie passwd mouse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 11:53 AM
09-04-2001 11:53 AM
Re: ftp scripts
Have instituted this here and found it to be secure and easily managed.
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 11:57 AM
09-04-2001 11:57 AM
Re: ftp scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 01:08 PM
09-04-2001 01:08 PM
Re: ftp scripts
#!/sbin/sh
if [ $1 = 'filename' ]
then
echo "Can't do it"
else
/usr/bin/cat $1
fi
The above script will look at the parameter passed to the script and if it matches 'filename' then it will not cat the file. If it does not match then it will invoke the real cat and you can read the file. You would put this script as 'cat' in some directory that is at the beginning of all the users path so that it gets found before the 'cat' in /usr/bin.
This is a bit simplistic, but hopefully you get the idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 01:13 PM
09-04-2001 01:13 PM
Re: ftp scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 01:21 PM
09-04-2001 01:21 PM
Re: ftp scripts
I am a little confused, you are ftp'ing files from HP to NT. and you have 150 users, so are you giving the password of 150 users in the script? why not ftp as root?
Also what do you mean display the lines of source?
Also Patrick, your solution would be fine as long as you use cat, what about pg, more , less ? Also the user can copy the file to a different name.
-Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 01:30 PM
09-04-2001 01:30 PM
Re: ftp scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 12:55 PM
09-05-2001 12:55 PM
Re: ftp scripts
I just verified that:
running "ftp -v -s:input.txt SERVER" in a DOS-box on the
windows side did what you wanted...
The input file "input.txt" is attached.
HTH,
Wodisch