-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gilberto Nunes ?rta:
| Hi
|
| I make a perl script, to build on the fly login script to my users.
| In this script, there's some group that called, to mount specif shares.
| However, when logged on to the domain, with the student group, for
| example,
| I received this message, for the syslog:
|
| [2004/01/16 16:37:13, 0] groupdb/mapping.c:init_group_mapping(139)
| Jan 16 16:37:13 samba smbd[8299]: Failed to open group mapping database
| Jan 16 16:37:13 samba smbd[8299]: [2004/01/16 16:37:13, 0]
| groupdb/mapping.c:get_group_from_gid(655)
| Jan 16 16:37:13 samba smbd[8299]: failed to initialize group
| mappingFailed to open group mapping database
| Jan 16 16:37:13 samba smbd[8299]: [2004/01/16 16:37:13, 0]
| groupdb/mapping.c:get_group_from_gid(655)
| Jan 16 16:37:13 samba smbd[8299]: failed to initialize group
| mappingget_alias_user_groups: gid of user gnunes doesn't exist. Check your
| /etc/passwd and /etc/group files
| Jan 16 16:39:46 samba sshd(pam_unix)[8405]: session opened for user root
| by (uid=0)
|
| Note that users gnunes, is enclosed in the student group.
|
| What's wrong with this?
|
| This the logon script:
|
| #!/usr/bin/perl
|
| $server="samba";
|
| # Log Start
| ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
| open LOG, ">>/var/log/samba/netlogon.log";
| print LOG "$mon/$mday/$year $hour:$min:$sec - User $ARGV[0] logged into
| $ARGV[1]\n";
| close LOG;
|
| # login script start
|
| open (LOGON,">/home/netlogon/.$ARGV[0].bat");
|
| print LOGON "\@ECHO OFF\r\n";
| print LOGON "NET TIME \\\\$server /SET /YES\r\n";
| print LOGON "NET USE H: /HOME\r\n";
|
|
| if ($ARGV[1] eq "student" || $ARVG[0] eq "student")
| {
| print LOGON "NET USE M:
\\\\$server\\publico\\pub_student\r\n";
| }
|
|
| print LOGON "\\\\$server\\NETLOGON\\.logon.bat\r\n";
| close LOGON;
|
Hi,
In my opinion you shouldn't rely on samba passing group membership
attributes to your script, for example my (bash) script does something
like this:
if [ `groups $USERNAME | grep student | wc -l` -gt 0 ]; then
.....
fi
Regards,
Geza
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFACEgU/PxuIn+i1pIRApeiAKCNB1a6OI7jWsgM5JcupWXPyMahwwCguH+S
sRn+/ZwSM54RDj3Fjh1lV+o=b6es
-----END PGP SIGNATURE-----