- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Auto Login via Script
Operating System - HP-UX
1821060
Members
2574
Online
109631
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО11-20-2009 05:18 PM
тАО11-20-2009 05:18 PM
Auto Login via Script
Hello all,
I am new to the forum and to scripting so please forgive my ignorance.
I need to create a simple script that will execute the login command to log in a phantom user. So far I have 'exec login "username"', which works just fine, but nothing else I try will pass the password to the password prompt.
What command can I use from withing the script to pass the password to the password prompt?
Thanks ahead of time,
John
I am new to the forum and to scripting so please forgive my ignorance.
I need to create a simple script that will execute the login command to log in a phantom user. So far I have 'exec login "username"', which works just fine, but nothing else I try will pass the password to the password prompt.
What command can I use from withing the script to pass the password to the password prompt?
Thanks ahead of time,
John
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2009 06:11 PM
тАО11-20-2009 06:11 PM
Re: Auto Login via Script
You didn't mention whether this login was using telnet, rlogin or ssh. For telnet and rlogin, the usual answer is to use Expect, a language that can automate interactive tasks such as login. However, Expect needs to be downloaded along with dependencies and installed. Then there's the 600 page manual...
The best choice is to use ssh and public keys. The scripting is quite simple with ssh.
Bill Hassell, sysadmin
The best choice is to use ssh and public keys. The scripting is quite simple with ssh.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2009 09:39 AM
тАО11-21-2009 09:39 AM
Re: Auto Login via Script
Once you execute exec login "username" you are gone from your script and can only be interactive with the process.
As Bill mentioned, if you use expect, you must create another process so both can exist.
As Bill mentioned, if you use expect, you must create another process so both can exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2009 10:38 AM
тАО11-21-2009 10:38 AM
Re: Auto Login via Script
you may also need to determine, from the person giving you this request, what they hope to attain by having this automated login.
It could very well be that just having the login won't solve what what they want to fix. I don't believe that the requestor gave you sufficient information, as in "what's supposed to happen once is logged in".
It could very well be that just having the login won't solve what what they want to fix. I don't believe that the requestor gave you sufficient information, as in "what's supposed to happen once
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP