It is currently Tue, 07 Dec 2021 02:54:42 GMT



 
Author Message
 ***How can I exit program and logout at once?***
I have a friend doing a little sys-admin and he is having the problem
where he would like to set up in his user's .login file an immediate
dumping into a program, and when they logout, to be immediately dumped
out of the system, not simply out of the program and into the shell,
where they might roam freely or even destroy.
He cannot seem to put logout in the shell script, for it does not seem to
work.  
Is there anyone out there with a sample script that would illuminate us?
Thanks.

Reply here or to me via mail.



 Sun, 23 Nov 1997 03:00:00 GMT   
 ***How can I exit program and logout at once?***
In article <knittingD9tMMt....@netcom.com>, knitt...@netcom.com (Knitting

I'm probably going to show some greens and I have not tried this but...
Try putting
   exec command
in the .login instead of just
   command
with any luck, the exec will replace (overlay) the current shell with the
command such that when the command exits, there will be no shell there.
Init will then fork a login once the command has exited.

Failing this, if the command is clever enough, you might consider directly
calling it from the /etc/passwd entry (no shell, just the command).

Good luck

--
--alen ... Trying to turn a SPARC into a FLAME
a...@crash.cts.com
(Arguing from first principles, when dealing with computers, rarely
 works. Computers have no principles).



 Mon, 24 Nov 1997 03:00:00 GMT   
 ***How can I exit program and logout at once?***

In article <alen-0706952225150...@liza.dialup.access.net>,

This is exactly what we did when we wanted to disable an account, back
when I was doing sysadmin.   For one thing, it allows you to leave the
.login intact, which is nice when you want to disable an account
temporarily and not have to restore user's files.  It's also much more
straightforward than putting an exec in the user's .login

Michael
--
----------------------------------------------------------------------------
Michael Bernstein / mbernst...@qualcomm.com             (303) 473-6704
Qualcomm, Inc. / 5450 Western Ave. / Boulder CO 80301   (303) 473-6650 (FAX)
----------------------------------------------------------------------------



 Sat, 29 Nov 1997 03:00:00 GMT   
 ***How can I exit program and logout at once?***

Gee, in the .login simply "exec" the desired program, which will
overlay the login shell and therefore will terminate the session
when the program terminates.

I assume the C-shell supports "exec", I try not to use C-shell myself.



 Mon, 01 Dec 1997 03:00:00 GMT   
 ***How can I exit program and logout at once?***

-> >> I have a friend doing a little sys-admin and he is having the problem
-> >> where he would like to set up in his user's .login file an immediate
-> >> dumping into a program, and when they logout, to be immediately dumped
-> >> out of the system, not simply out of the program and into the shell,
-> >> where they might roam freely or even destroy.

-> >Failing this, if the command is clever enough, you might consider directly
-> >calling it from the /etc/passwd entry (no shell, just the command).

-> This is exactly what we did when we wanted to disable an account, back
-> when I was doing sysadmin.   For one thing, it allows you to leave the
-> .login intact, which is nice when you want to disable an account
-> temporarily and not have to restore user's files.  It's also much more
-> straightforward than putting an exec in the user's .login

My .login:

...
stuff
...
echo Type Control-C to interrupt...
sleep 3
echo Sorry, too late ...
logout
--
Matus Uhlar (fantomas,uhlar on IRC),
Computer Centre of Technical University in Kosice, Slovakia
E-mail: Matus.Uh...@tuke.sk



 Tue, 02 Dec 1997 03:00:00 GMT   
 
   [ 5 post ] 

Similar Threads

1. preventing program exit on logout under X

2. Script to logout from all consoles at once

3. logout all users at once

4. can'nt login once logout!Help plz

5. Changing the logout script for exit button

6. CDE exit-logout difference

7. How to auto-logout after exiting XWindows/desktop

8. Calling logout or exit within PERL

9. logout/exit/ctrlD

10. logout/exit/ctrlD


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software