- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Can you bypass .profile or run an alternate on...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО11-01-2001 12:40 PM
тАО11-01-2001 12:40 PM
Can you bypass .profile or run an alternate one from login: prompt?
If you are familiar with OpenVMS, one solution would be a command switch or option from the 'login:' prompt. In OpenVMS you can bypass the login command file (equivalent functionally to .profile) with a /NOCOMMAND switch typed immediately after the username at the 'Username:' prompt. Example - Username: JOHNDOE /NOCOMMAND. Or, alternatively, Username: JOHNDOE /COMMAND=ALTERNATE. Is there anything like this in HP-UX, a way to determine at login verification what happens immediately after your process is created?
Thanks you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 12:53 PM
тАО11-01-2001 12:53 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
You could construct your own environment (script, for instance) and declare it in lieu of the normal shell program in /etc/passwd.
Often this is done for menu-based scripts where the intent is for the user to login and immediately be placed in a restricted, menu-only environment. Whether or not the script so offered allows shell-out is up to you.
Does this help?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 12:59 PM
тАО11-01-2001 12:59 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
It depents on how you log in. Reflection or X logins do not run .profile. But i do not think that rthe login process can be changed while you login.
login verifies the account starts a shell (can be changed in passwd )and runs .profile.
hope this will help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 01:18 PM
тАО11-01-2001 01:18 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
go about it:
One is to:
Remove the shell of these
user(s) in the /etc/passwd
file and replace it with
the "'executable"" you want
to run. Also, remember to
include this executable in /etc/shells file.
Another one is to:
Let the .profile be there,
but its contents have:
trap "exit" 1 2 3
exec "command"
----
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 02:06 PM
тАО11-01-2001 02:06 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
I don't think there is an option in hp to bypass the profile.
The choice for you would be to put an exit in the begining of .profile to exit the execution of the profile or to edit /etc/profile to exit after running /etc/profile (std system profile run for every user before uer .profile) for that particular user. To run a specific profile once logged into the system you can run it using
./user_personal_profile
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 02:17 PM
тАО11-01-2001 02:17 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 02:37 PM
тАО11-01-2001 02:37 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 02:42 PM
тАО11-01-2001 02:42 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
Replace the entry in the /etc/passwd file
where its states the shell. e.g. /usr/bin/ksh
change to /usr/local/yourprogram. Make sure
that you add this entry to the file /etc/shells.
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2001 02:47 PM
тАО11-01-2001 02:47 PM
Re: Can you bypass .profile or run an alternate one from login: prompt?
Login: mylogin nocommand
Password: xxxxxx
Then when ksh runs /etc/profile, enironmental variable L1 will be set to "nocommand". You could test for this and take the appropriate action.
-- Rod Hills