No concurrent login


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users No concurrent login
# 8  
Old 01-24-2003
Ok, good question...
# 9  
Old 01-24-2003
Quote:
Originally posted by champion
Ok, good question...
Well there are two possibilities here....

Maybe "pulling the plug" will drop dtr on a terminal or something that will result in the shell getting a HUP signal. In this case, the shell will exit and it will perform the .logout or the trap commands that will remove the lock file. The user, at this point is no longer "logged in", the lock file is gone and there is no problem.

Or maybe "pulling the plug" will not result in a HUP being sent to the login shell. So it will continue to sit there. The user is still "logged in", the lock file continues to exist. And so the user cannot login again.

That is the whole point, right? No concurrent logins? If this bothers you, then why do it?

Users should not be "pulling the plug" as a logout mechanism. I would pose the same question to them: It this bothers you, then why do it?

There are some counter-measures that can help some here. Most shells have a timeout mechanism. For example, in ksh you can set TMOUT to a number of seconds. When that number of seconds passes without a command being typed, the shell will exit. As it does, it will execute any commands set to "trap" on signal zero. A built-in shell timeout mechanism will work for any style of connection. And the user can customize the timeout period to suit his needs.

If they connected on a directly attached terminal, they can turn it back on and continue with the session. You should be able to arrange for the port to notice DTR from the terminal dropping when a terminal is turned off. This would send a HUP to the login shell.

If they are connecting via modem, you have a real security problem. You need to insure that when the modem notices that carrier dropped, a HUP is sent to the login shell. If this is not done, the next person to use that modem will inherit the first persons session.

If they are connecting via tcp/ip, you can configure keepalives to break the connection and send the shell a HUP in the process. But whatever you do will affect all tcp connections. Tcp keepalives are controversial so you may want to think about this first.
# 10  
Old 01-24-2003
No matter what you do, you are going to have folks who do not logout correctly and may leave a session out there.

If you use something like introcomp.co.uk - restrict login you would also have to have something to kill off users who are idle for a certain amount of time. Setting up each .profile would also be a hassle (especially if with the linked script ) if you wanted to change how many logins were allowed. Setting up a link from all home directories to a common .profile might be a way around that ( it matters if your home directories are NFS mounts or not).

Found that this works just as well in /etc/profile - of course, you might want to change the logic and allow root and other special accounts to get around the limit set.

Also note that the script does not stop Control-C break outs which could allow folks to have more than one session. A cron script to look for specific user and more than one terminal association could kill off second process (again, more work to figure out which is which).

Without 3rd party software which would make this easier, your options are limited and a headache you might not want to do.

Last edited by RTM; 01-24-2003 at 11:07 AM..
# 11  
Old 01-24-2003
If someone pulls the power cable, you simply clear all lock files during the reboot process. There are no sessions after a power failure so it is appropriate to clear all the session locks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Difference between concurrent and enhanced concurrent VG

Hi, What are the differences between concurrent and enhanced concurrent VGs.? Any advantages of enhanced concurrent VG over normal concurrent vg Regards, Siva (2 Replies)
Discussion started by: ksgnathan
2 Replies

2. Solaris

Increase concurrent logins?

Hi all, I've been tasked to create a robot account across a bunch of SunOS servers, amongst the requirements for this account is this condition: Concurrent access requirement The robot account shall have the ability to create at least ten(10) concurrent access sessions. In order to... (0 Replies)
Discussion started by: dan-e
0 Replies

3. Shell Programming and Scripting

Concurrent execution

Hi all, I have a folder with sql files that need to be inserted in a DB with SQL*Plus. The thing is that it takes too long to insert them all one by one, so I want to insert them five at a time. Currently what I use is this: for $FILENAME in *.sql do sqlplus -s $DBUSER@$SID << EOF ... (0 Replies)
Discussion started by: Tr0cken
0 Replies

4. Linux

Is Concurrent I/O (CIO) available on Linux?

Hi Guys, I just wondering if any of the AIX gurus with some exposure to Linux Redhat can tell me whether in Linux ( Red Hat or OpenSuse ) we have a similar option/capability like the CIO (Concurrent I/O) which is currently available on AIX. The reason I'm asking is because in the past we... (2 Replies)
Discussion started by: arizah
2 Replies

5. AIX

chvg -g on Concurrent VG

Hi, on normal (non concurrent) vgs, it's possible to extend a lun on san-storage , and use chvg -g to rewrite vgda, and use disks with the new size for lvm operations is the same procedure possbile on a hacmp-cluster (2 node in our case) with concurrent vgs in active/passive mode? cheers... (5 Replies)
Discussion started by: funksen
5 Replies

6. Shell Programming and Scripting

concurrent processes

We have a very large text file..contains almost 100K lines. We want to process this file to generate another text file as per our data requirement. As for now the parsing of data takes 20-25 mins each , for 100K lines. the current script uses : While Read Each Line do parsing.. Done ... (6 Replies)
Discussion started by: Amruta Pitkar
6 Replies

7. Shell Programming and Scripting

Concurrent writing to file

Hi I have a ksh that can have multiple instances running at the same time. The script (each instance) uses the SAME log file to write to. Should this cause a problem or is the ksh clever enough to queue write requests to the file? Thanks. GMMIKE (2 Replies)
Discussion started by: GNMIKE
2 Replies

8. Shell Programming and Scripting

threads - concurrent processing

i have a program which uses a java thread that concurrently copies table data with many DB connections (one for each thread) new to unix, wanted to know if its possible to do a similar thing in a shell script. for eg script.sh trigger 2 stored procs at the same time which are... (6 Replies)
Discussion started by: siva_jm
6 Replies

9. Filesystems, Disks and Memory

concurrent file access

Hi I am fairly new to the Unix environment and need to understand how Unix handles concurrent access to files and how it differs to Win NT. Any help would be greatly appriciated :) (1 Reply)
Discussion started by: beechwood
1 Replies

10. UNIX for Dummies Questions & Answers

Definition of Concurrent Users

Can someone guide me in telling me what is a good definition of concurrent users. Is there a website I can go to to get this definition? (2 Replies)
Discussion started by: mpshaw
2 Replies
Login or Register to Ask a Question