HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: logging out using Scripts
Operating System - HP-UX
1832855
Members
2998
Online
110047
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
02-02-2001 07:14 AM
02-02-2001 07:14 AM
I need to make a script that once it is executed it will automatically log out the user
Does anyone maybe know how to actually log out the user ?
Does anyone maybe know how to actually log out the user ?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2001 07:19 AM
02-02-2001 07:19 AM
Re: logging out using Scripts
At the end of your script, type:
exit
on a line by itself.
exit
on a line by itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2001 07:20 AM
02-02-2001 07:20 AM
Solution
Stefan:
If you want the user to only be able to execute a particular script (as is common with menu-based loops), then either:
1. Substitute the script name in place of the normal shell name in the seventh, colon-delimited field of /etc/passwd.
2. As the last line of the user's $HOME/.profile, do:
exec <script>
This will cause the <script> to run and upon exiting, the user will be logged off.
...JRF...
If you want the user to only be able to execute a particular script (as is common with menu-based loops), then either:
1. Substitute the script name in place of the normal shell name in the seventh, colon-delimited field of /etc/passwd.
2. As the last line of the user's $HOME/.profile, do:
exec <script>
This will cause the <script> to run and upon exiting, the user will be logged off.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2001 01:30 PM
02-08-2001 01:30 PM
Re: logging out using Scripts
Under ksh "kill -HUP $PPID" will kill off the parent process if that is what you are trying to do.
Jim Trice
Jim Trice
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP