[Samba] Login and logout scripts

Maurice Forte mforte at us.ibm.com
Tue Jan 30 16:59:31 GMT 2007


Recently,  I was trying to do something similar with login/logout scripts 
or the preexec clause but couldn't get it to work.   I am running Samba 
3.0.23c on AIX(not as PDC) with LDAP and 'security='user'  in the smb.conf 
file.   Can you run login/logout scripts without a PDC?   For the Windows 
clients that connect to my Samba server,  I want to capture their 
%USERNAME% and compare it to the user that they are trying to connect to 
the share with?   If they are different,   I want to deny mount access to 
the share.   I looked at the Samba variables but there is no variable for 
capturing the user's login name.    Do you have any ideas on how to 
accomplish such a task?

Maurice Forte
Email:  mforte at us.ibm.com
Phone: 919-486-0153

"Paul McGrath" <J.P.McGrath at leeds.ac.uk> 
Sent by: samba-bounces+mforte=us.ibm.com at lists.samba.org
01/24/2007 07:12 AM

<samba at lists.samba.org>

RE: [Samba] Login and logout scripts


If you are just using a samba server as the PDC with no MS Windows
domain controller then yes you can have login scripts.

You can also use group membership comparisons within the login script
using a windows tool called ifmember.exe.  Both the vbs/bat files and
ifmember.exe go /etc/netlogon.

To do the group comparison you have do a net groupmap command to map the
unix group with an nt group.

I have done this on a Mac Tiger and Panther server.  If you want more
info mail me directly.  I am going on holiday tomorrow so I may not get
back straight away.

> -----Original Message-----
> From: Mauricio Szabo [mailto:mauricio.szabo at ufabc.edu.br] 
> Sent: Tuesday 23 January 2007 12:43
> To: samba at lists.samba.org
> Subject: [Samba] Login and logout scripts
> Is there a way to run a script on my samba PDC machine when a 
> user logs in and logs out?
> Thanks in advance.
> --
> Air conditioners and Computers are the same - they both crash 
> when you open Windows.
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list