[SunHELP] setting shell timeouts
J P
sunhelp at sunhelp.org
Fri Mar 23 16:08:12 CST 2001
Cool, thanks! I'll be giving this a try right away!
You da' man, I was told it couldn't be done, I knew it
works on our consoles and other pieces, just wasn't
sure how to get it to go on the box itself.
With MUCH thanks,
Peer
--- Nicholas Dronen <ndronen at frii.com> wrote:
> On Thu, Mar 22, 2001 at 06:13:01AM -0800, J P wrote:
> > Hey all,
> > how do you set a shell timeout for every user on a
> > system, or for any one user either?
>
> With the Korn shell, just make TMOUT a readonly
> environment variable.
>
> $ readonly TMOUT=5; export TMOUT
> $
> shell will timeout in 60 seconds due to inactivity
>
> With the C shell, who knows? I suggest simply
> not using it. Tcsh might have something that
> works, however.
>
> To make this global, put it in /etc/profile.
> It's a bit tougher to make this local to a user
> without allowing them to change it. You
> can set the environment variable in .profile
> or .kshrc, but since the user probably needs
> write permission to his or her own home directory,
> you can't prevent him or her from editing
> the file and simply logging in again.
>
> If you want the timeout to apply only to a
> certain set of users, you can put shell
> script code in /etc/profile to check the
> user's uid (or gid) to determine whether
> to set the variable when he or she logs
> in.
>
> Regards,
>
> Nicholas Dronen
> _______________________________________________
> SunHELP maillist - SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
More information about the SunHELP
mailing list