RE: [Samba] Login and logout scripts
Paul, 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? Thanks, Maurice Forte Email: [EMAIL PROTECTED] Phone: 919-486-0153 Paul McGrath [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 01/24/2007 07:12 AM To samba@lists.samba.org cc Subject RE: [Samba] Login and logout scripts Mauricio, 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. Regards Paul -Original Message- From: Mauricio Szabo [mailto:[EMAIL PROTECTED] Sent: Tuesday 23 January 2007 12:43 To: samba@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 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Login and logout scripts
I was trying to this same thing yesterday. No PDC (it's setup as one, but the machines are not joined to the domain), the machines (XP only) are in a simple workgroup. Local group policy to run the logon/logoff script. Not all of the usernames exist on the Samba server. Only one department (accounting) so far, but I have 5 defined, and they are members of the appropriate groups, etc. All the usernames/passwords on the client match the usernames/passwords on the Samba Server, so it's transparent if the user exists. What I can't figure out is how to bypass the prompting for a username/password for the ones that don't exist. I looked at the ifmember stuff, but I'm doing local logons, so no joy there. Can I query the Samba server for group membership in my logon script somehow? I attempted to add the drive mapping like this: net use g: \\server\%username% Except the usernames that don't exist get prompted to enter a username and password. I tried passing an enter key by using an enter.dat, but it doesn't get to that line in the script because it's waiting for a response. I'm currently bypassing this part by putting a check file on the machines in accounting. I figure someday I will get them to join the domain, and I'll work it out then, but if someone knows how to make it work otherwise, please let me know Here's what I've done: IF NOT EXIST %systemdrive%\checks\acctng.chk GOTO EOF net use g: \\server\%username% net use h: \\server\accounting :EOF Thanks, Dennis Oh, Samba version 3.010149 on Centos 4.4 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maurice Forte Sent: Tuesday, January 30, 2007 9:00 AM To: Paul McGrath Cc: samba@lists.samba.org Subject: RE: [Samba] Login and logout scripts Paul, 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? Thanks, Maurice Forte Email: [EMAIL PROTECTED] Phone: 919-486-0153 Paul McGrath [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 01/24/2007 07:12 AM To samba@lists.samba.org cc Subject RE: [Samba] Login and logout scripts Mauricio, 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. Regards Paul -Original Message- From: Mauricio Szabo [mailto:[EMAIL PROTECTED] Sent: Tuesday 23 January 2007 12:43 To: samba@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 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Login and logout scripts
Mauricio, 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. Regards Paul -Original Message- From: Mauricio Szabo [mailto:[EMAIL PROTECTED] Sent: Tuesday 23 January 2007 12:43 To: samba@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
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. Correction: it is ISMEMBER.EXE, not ifmember.exe. You can also use something called OSVER.EXE to determine the Windows OS version, if you want to run different commands for different OS versions. I had to do things a little differently to get this to work right on my windows 2000 domain. I had to copy the ISMEMBER.EXE files to the local computer, running them directly from the script did not work. So I added a test to the batch file to look for the existence of the files (ISMEMBER.EXE and OSVER.EXE), which copies them to the local computer if they are not there. I didn't try changing it when I converted, so Pauls suggestion might work just fine. This also allowed me to put the files in a different location (not the NETLOGON share): begin snippet if exist C:\WINDOWS\system32\ISMEMBER.EXE goto map-home if exist y: net use y: /del net use y: \\myserver\installers /persistent:no copy y:\free\ISMEMBER.EXE c:\WINDOWS\system32\ copy y:\free\OSVER.EXE c:\WINDOWS\system32\ :map-home if exist y: net use y: /del whatever you want for the rest of the commands here end snippet hth... -- Best regards, Charles -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Login and logout scripts
Maybe use preexec? It's a share thing, but you should be able to script something . . . MaurĂcio Szabo wrote: But what I want to do is a login / logout script that runs *on the samba server*, so when a user logs in, I could make a backup of his home share before he logs... On 1/24/07, *Toby Bluhm* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Charles Marcus wrote: 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. Correction: it is ISMEMBER.EXE, not ifmember.exe. ismember.exe osver.exe are third party tools. ifmember.exe is part of MS Resource Kit. -- -Toby -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Login and logout 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/netlogo Correction: it is ISMEMBER.EXE, not ifmember.exe. ismember.exe osver.exe are third party tools. ifmember.exe is part of MS Resource Kit. Wups... thanks for the correction. I remember now, for some reason ifmember did not work for me, so I found and used ismember (and osver) which did. Can't remember what the problem was though... -- Best regards, Charles -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Login and logout scripts
I have samba setup as PDC with win 2003 AD so what i did is i setup login/logout scripts using group policy On 1/23/07, Mauricio Szabo [EMAIL PROTECTED] wrote: 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 -- Unless you try to do something beyond what you have already mastered, you will never grow. Ronald E. Osborn -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba