- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to su thru shell 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
08-19-2000 04:22 AM
08-19-2000 04:22 AM
How to su thru shell scripts?
Also if I try to ftp from unix to my local disk (giving my machine's IPaddress) it says connection refused. Do I need to change some permissions somewhere?
Thanx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2000 05:55 AM
08-19-2000 05:55 AM
Re: How to su thru shell scripts?
With regard to the use of 'su' in a script, if you are root, of course, you can use the 'su -' form and no password is required. For non-root scripts, while you can su to another account within a script, you will not be able to use a stored password. The user of the script will have to interact through his/her terminal to provide the password. Your script can, however, check the exit status of the su call, and so determine when/whether a good transition to the new user was made.
With regard to your FTP problem, you must, of course, have an FTP client running on your PC.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2000 03:21 PM
08-19-2000 03:21 PM
Re: How to su thru shell scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2000 05:41 PM
08-19-2000 05:41 PM
Re: How to su thru shell scripts?
Using .netrc in user's home directory could be a security hole. Depends on the environment.
Using suid or sticky bit (s or t permission) could help you as well, depends in what you try to achieve.
For ftp, well, could be lots. What machine (OS, I mean) is your topdesk? Can you ftp from your topdesk to Unix? Try nslookup on Unix side to ensure the name resolution is corectly solved. Edit fptd line in /etc/inetd.conf to log ftp ( ftpd -l); recycle inetd daemon (inetd -c). See the error logged in /var/adm/syslog/syslog.log file.
See the other posts about ftp were lots of discutions.
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2000 08:56 PM
08-20-2000 08:56 PM
Re: How to su thru shell scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2000 08:11 AM
08-21-2000 08:11 AM
Re: How to su thru shell scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2000 01:38 PM
08-21-2000 01:38 PM
Re: How to su thru shell scripts?
the syntax is something like the following:
spawn "su -"
expect "Password:"
send "
You may have to terminate each line with a semi-colon (;) I can't get to my script to verify right now. You have to have expect installed in order for this to work, I think it is part of the TKL stuff.