Logon once parameter.

Chris G Haravata cgharavata at apc.edu.ph
Tue Oct 16 18:04:30 GMT 2001


I tried using your exec script down there and I got an error whenever my
users log in to the server.  From my logon script, it says that the shares
is not accesible, eventhough that is the first time my user logs in.

Please help me on this as I also need this feature.

> -----Original Message-----
> From: samba-admin at lists.samba.org [mailto:samba-admin at lists.samba.org]On
> Behalf Of Joel Hammer
> Sent: Tuesday, October 16, 2001 9:34 AM
> To: George Farris; samba at lists.samba.org
> Subject: Re: Logon once parameter.
>
>
> 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
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.286 / Virus Database: 152 - Release Date: 10/9/2001
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.286 / Virus Database: 152 - Release Date: 10/9/2001





More information about the samba mailing list