Restricting multiple terminal logins from same username
David.Collier-Brown at canada.sun.com
Tue Aug 8 12:30:42 GMT 2000
[redirected to samba at samba.org]
Godwin Monis wrote:
> I want to restrict the users such that a particular user cannot do
> simultaneous logins from more than one workstation. i.e. if he/she
> wants to login to a particular workstation he/she will have to
> logout from the previous workstation.
I can think of two ways, one Windows-flavored,
the other Unix-flavored.
Use a login script saved on a Samba share that checks
a file to see if the user is logged on elsewhere, and
if not updates that same file. This will fail if the
user tends to shut off their machine instead of logging out.
Use the "preexec" option to run a script that
parses smbstatus output, and return non-zero
if the user is already connected. This will require
a keepalive setting of 30 seconds to one minute,
so that samba will clean the connections to powered-off
or crashed Windows machines. And Samba 2.0.7 or so.
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 at canada.sun.com
More information about the samba