Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logout user on 'EXIT'

Status
Not open for further replies.

markuscj

MIS
Feb 15, 2006
35
GB
Hi scripters

I am fairly new to scripting and have this question:

I am writing a korn shell script in AIX which is a simple menu for a specific user, when this user logs in the menu will run, now the last option on the menu is 'EXIT', when this is selected I want the user to be logged out of the system. I don't want this user to be able to get to the command prompt, so I want to disable the use of CTRL+C and CTRL+D as well.

I'm sure this is simple for you experienced scripters!

TIA
 

Also you could add the "logout" command at the end of the script.
[3eyes]



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Also you could add the "logout" command at the end of the script.

That was actually the first thing I tried, but it didn't work as I was testing it by switching user from root to the user I wanted logged out - obviously logging in directly as this user and then exiting does work :)

Was just having my stupid head on for a little while there!

Thanks for your help all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top