[Samba] Group Login Scripts in Samba 2.2.3?

K. Hawkes k.hawkes at zombies.force9.net
Sat Mar 23 03:58:03 GMT 2002


Hi, I'm new to this mailing list so I don't know what the rules are here, so
I apologise in advance if I break any.

In Samba 2.2.3a it has the smb.conf line of 'login script', a few days ago I
tried 'login script = login.bat %U'.
Upon doing this, Samba didn't process my login script at all.  This may seem
like a really stupid question, but why is this?

The only reason I can think of (after looking at the code) is that it
ignores whitespace in the 'login script' smb.conf directive and
if it sees it, it ignores the whole line?  I'm not a good coder, I can read
the stuff and understand it for the most part but I'm no guru.

What I was wondering is, what kind of code modifications would it take to
allow a parameter of 'login.bat %U' so that when
Samba sees that line, it executes login.bat with the parameter of %U (%U
according to the SWAT docs means 'username')?

I ask because I got curious as to whether GROUP login scripts would work, I
coded a small C tool that parses the passwd and groups files (in /etc) to
check for the existance of the user in question and to check what group
they're in.  It then creates a 1-byte file
in the /export/netlogon/test/groups directory of 'username-groupname' which
my login.bat then checks for it's existence in the directory.  If it finds
it, it calls the /export/netlogon/test/groups/<groupname>.bat file IF it
exists.  I've tested my C tool and the batch files and they work fine, it
led me to the conclusion above about the 'login script' smb.conf directive.

Any ideas on this?  Okay yeah it is just me being curious, but an additional
thought could be if people wanted to go from Novell Netware to Samba, they
can use group login scripts in Novell.  Just a thought.

Thanks,

Kris

"May darkness be your only ally, for in the shadows you can hide" - Kris
1998-2002

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQEVAwUBPHjfdSBHjRAjzresAQHZpgf/ZKpt2Nl+8EmIJwT/rLFtx8yhFFKdqVk6
pQGsgeOGN1ZI5kSOU6FBeWkyVS3YKLV6UHhvHVm1MQuBwPyfnjhQGj+OuI9jQPoc
qTFb0TRQivOQoOeJq1PfIFcl53RrvRUOFAl8+jdKqZo/IFARdllknkCMTZirvp5l
M+7/4a/ua2rx8d46zab1RF5YYNHRjyJRXD913FHty5VXCX31DJ55nAho30lOKOPC
TNT+zzO1UC/J+keWSjxSSV3wPeOiOgtUtI5FiuXJmv1IXzsxjogGCTd0HUJ/04mR
H623bEhl8M8yF/x6seCNKpHDkDQjoL+ddlQGVezdgbg3z7Jd7Y6VKA==
=/whC
-----END PGP SIGNATURE-----





More information about the samba mailing list