I'm setting up a lab full of users here at the college and really need to be able to restrict a user to a single login at any given time. Does anyone have any thoughts or suggestions about this? Once the user has logged in at a workstation they wouldn't be able to use another workstation until they logged out of the one they were on. This is the difference between using Samba and going with Netware. I'd REALLY appreciate anyone who can help me with this. Thanks. -- =================================================================George Farris farrisg@mala.bc.ca Computer Support Cowichan "For every vision - there is Malaspina University-College an equal and opposite revision"
George, On 26 Oct 2000 13:35:11 +0000, George Farris wrote:>I'm setting up a lab full of users here at the college and really >need to be able to restrict a user to a single login at any given >time. Does anyone have any thoughts or suggestions about this? > >Once the user has logged in at a workstation they wouldn't be able to >use another workstation until they logged out of the one they were >on.You can use preexec close = yes preexec = /some/script %U # or %u, you may have to test In /some/script you could check the output of "smbstat -u $1" and react on the outcome. Regards, Robert -- --------------------------------------------------------------- Robert.Dahlem@gmx.net Fax +49-69-432647 --------------------------------------------------------------- Sent using PMMail (http://www.pmmail2000.com) - fast, decent, email software; far better than Outlook. Try it sometime.
George Farris wrote: | I'm setting up a lab full of users here at the college | and really need to be able to restrict a user to a single | login at any given time. Does anyone have any thoughts or | suggestions about this? Hmmn, you can do this with a preexec script, but you need a reliable way of detecting logoff, even when a PC crashes or is shut off. I recommend using the --with-uname option, and root preexec close = yes root preexec = /some/path/to/script %u <script> :: x=`last $1 | grep 'still logged in'` if [ "$x" != "" ] then echo "$1 tried to log in twice at `date`" >$LOG exit 1 else exit 0 fi This will require your system have a way of removing bogus "still logged in" records from wtmp, packaged nicely for the lab supervisor to use, as murphy's law states that PC will crash mysteriously during the week of heaviest lab use (;-)) Alternately, you can keep the data yourself, and have scripts to add users and delete users, and run the delete script from root postexec. --dave -- David Collier-Brown, | Always do right. This will gratify some people 185 Ellerslie Ave., | and astonish the rest. -- Mark Twain Willowdale, Ontario | //www.oreilly.com/catalog/samba/author.html Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb@canada.sun.com