Link to home
Create AccountLog in
Avatar of mkuser01
mkuser01Flag for Canada

asked on

Solaris automatic logoff

Hi,

how can I set my solaris box to automatically logoff users after 30 mins of inactivity?

mkuser01
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of mkuser01

ASKER

Hi Tintin,

Not working.  I put the line that you have mentioned on the /etc/profile.
Hi,

Please note that setting TMOUT to automatically logout ideal users is working fine, but it has different behavior under bash and ksh. Please see the description in the following link on how bash an ksh behave.

http://open.itworld.com/5040/nls_unix_idlelogons060629/page_1.html

I tried setting TMOUT from the command prompt and it works.
Avatar of Tintin
Tintin

mkuser01.

What is the default shell of the users?
Hi,

If the users login shell is

- ksh / bash, then use TMOUT=num (where num is number of seconds, this can be included in .profile .bash_profile in the user home dir) env variable to set timeout in seconds (please see previous link for ksh behavior).

If ksh / bash not the login shell, then it will simply exit that shell.

- csh / tcsh, then use

set autologout = num (where num is number of minutes, this can be included in .login of the user in his/her home dir).




Actually I have two Solaris boxes.  I am using root for this scenario.  both are using ksh.

I am just wondering, the other one is using /bin/ksh while the other one is using /usr/bin/ksh.  This are the same right?
Yes, /bin/ksh and /usr/bin/ksh are the same

$ ls -ld /bin
lrwxrwxrwx   1 root     root           9 Oct  5  2005 /bin -> ./usr/bin


So what happens when you login as root and do

export TMOUT=5

To all,

My opology!!! I did have a typo error and that was causing the problem.  first suggetion from Tintin works fine.

Thanks.
Hi,

If you can clarify if it is taking the exact time for ksh or it is giving additional 60 seconds as described in the link and which is happening on my system as well.