[Samba] login scripts --what to use

Toby Bluhm tkb at midwestinstruments.com
Fri Jun 20 12:50:50 GMT 2008


Dennis McLeod wrote:
>> -----Original Message-----
>> From: samba-bounces+dmcleod=foranyauto.com at lists.samba.org 
>> [mailto:samba-bounces+dmcleod=foranyauto.com at lists.samba.org] 
>> On Behalf Of Christopher Perry
>> Sent: Thursday, June 19, 2008 7:14 AM
>> To: samba at lists.samba.org
>> Subject: [Samba] login scripts --what to use
>>
>> Hi,
>> We're setting up a PDC, and would like to have a login script 
>> to deliver the mapped drives to users in particular groups, 
>> and connect to printers. The printer drivers come from the 
>> [print$], share.
>>
>> Does anyone have any good resources for this? What's the 
>> easiest and simplest thing to get going --vbscript or batch files?
>>     


. . . chop . . .


> ----------------------------------------------------------------------------
> ----------------------------------------------
>
> What I'd like to know is how to make a certain script run if the machine
> name is in a certain file.
> Put my parts department machinename in a parts.txt file, and then have the
> script check to see if it's there. (or perhaps some other way to accomplish
> this.....)
> I just haven't spent the time to look for this yet.
>
>
>   


@echo off

call :_DO_ALL_PCS
echo Do more stuff on any PC
goto :_END

::
:: routines
::

:_DO_ALL_PCS
for /f "usebackq eol=c" %%C in (`type \\SERVER\netlogon\hosts.list`) do (
if "%COMPUTERNAME%" == "%%C" call :_DO_%COMPUTERNAME%
)
goto :EOF

:_DO_PC_01
echo Do stuff specific for PC_01
goto :EOF

:_DO_PC_02
echo Do stuff specific for PC_02
echo Do more stuff specific for PC_02

goto :EOF

:_END




-- 
Toby Bluhm
Alltech Medical Systems America, Inc.
30825 Aurora Road Suite 100
Solon Ohio 44139
440-424-2240 ext203




More information about the samba mailing list