On Fri, 14 Jun 2002 08:57:01 +0800, Edward wrote: >See the attached perl script and add the following line to [netlogon] >exec = logon-script > >You can modify the perl script to do anyting you want for any user -for >example IF user part of ADMIN group, map an ADMIN share.
and attached the script: #!/usr/bin/perl # # log when a user "logs into the network" # and generates a custom logon script # # ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $month = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')[$mon]; open LOG,">>/var/log/samba/netlogon.log"; print LOG "$month $mday $hour:$min:$sec\t$ARGV[0] logged into Linux\n"; close LOG; open LOGON,">/home/netlogon/$ARGV[0].bat"; print LOGON "\@echo off\r\n"; print LOGON "NET USE H: \\\\SERVER\\$ARGV[0]\r\n"; print LOGON "NET USE S: \\\\SERVER\\SHARED\r\n"; print LOGON "NET TIME \\\\SERVER /YES /SET\r\n"; close LOGON; ------------------------------------------- That's interesting. How does the script get the parameter ARGV[0] ? _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list