Logon once parameter.
Joel Hammer
Joel at HammersHome.com
Mon Oct 15 18:32:03 GMT 2001
It would be easy to write an exec command to test smbstatus and return 1 if
the user is logged on or zero if not logged on. Have the prexec close = yes.
As far as I can tell, you have to put the exec command in a share, not in
the global section, which is a nuisance but not much.
For example, in a share put:
[share]
exec = a=`smbstatus | grep %U`; [ -z "$a" ] && exit 0
preexec close = yes
Anytime a user (%U) logs onto that share, if the user is logged onto any
other share, or this share, the request is refused. Of course, looking at
smbstatus, you can see you can get more specific or could use other
parameters to deny service.
Here is the message I get when things work as expected and a user is denied:
tree connect failed: ERRSRV - ERRsrverror (The server encountered an
internal error, e.g., system file unavailable.) tree connect failed: ERRSRV
- ERRsrverror (The server encountered an internal error, e.g., system file
unavailable.)
On the windows box it returns a nonhelpful message about the network
responding incorrectly.
You could send a pop up message to your clients, too.
samba is very flexible.
Of course, I haven't tested this approach out in detail, but you get the
idea.
You could
Joel
On Mon, Oct 15, 2001 at 02:58:31PM -0700, George Farris wrote:
> Would there be a problem adding a parameter to samba that would restrict
> the number of login's to users? We have Samba set up in a College with
> 4 labs full of 20 computers each. I want my students to be able to
> login only at one station at a time. If a user tried to login a second
> time the connection would fail. They would not be able to use the
> computer.
>
> Something like "Allowed Connections = 1" or "User authentications = 1"
>
> Or is there some other way to do this?
>
> --
> ==================================================================
> George Farris farrisg at mala.bc.ca
>
> Computer Support Cowichan "For every vision - there is
> Malaspina University-College an equal and opposite revision"
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list