Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 02-05-2004, 03:15 PM   #1
LQ Newbie
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
Preventing multiple logins (of same userid) on RH73

Hi, does anyone know of a way to prevent users from loging into a RH73 server multiple times from different (windoze) workstations? This box is configured as a PDC through samba.
Old 02-11-2004, 05:45 AM   #2
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
Hi hawk2xl,

If users are logging in on the command line (e.g. with ssh or telnet), an easy (though not too elegant) method would be to put a script in the profile (e.g. .bash_profile or, better, /etc/profile) that checked to see if the user was already logged on and, if so, terminated the session.

Unfortunately, I don't have access to a Linux box right now, but it should be something like :

if [ $(who | grep ^$(whoami) | wc -l) -gt 1 ]
      echo "User $(whoami) is already logged on...logging off now"
(The above works with AIX and korn shell, which is what I can log onto right now. You might also want to check out the trap command).

Last edited by iainr; 02-11-2004 at 05:46 AM.
Old 03-23-2004, 10:45 AM   #3
LQ Newbie
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Sorry if I did not explain clearly. The users are not logging in on the command line (e.g. with ssh or telnet). The server is configured as a replacement for a Windoze NT4 Primary Domain Controller. Users are logging into the domain through this server.

I would like to prevent users from loging in (clients ranging from Win9x to 2k to xp) more than once with same account, while not restricting them to a fixed pc.

I know that some of my users are sharing their userid and passwords. For what reason, I do not know.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing multiple instances of MPlayer (GUI) MrPotato Linux - Software 1 08-22-2005 04:02 PM
multiple logins edgjerp Mandriva 8 02-24-2005 10:10 AM
why multiple desktops/logins? DJOtaku Linux - General 2 02-04-2005 12:48 AM
Multiple Logins jbraum Mandriva 1 01-21-2004 06:37 PM
preventing multiple process instances the_dayi Programming 2 07-14-2003 05:57 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration