[Samba] how to map shared folders when start user profile in XP

Daniel Müller mueller at tropenklinik.de
Tue Nov 16 03:28:55 MST 2010


Hi,
first of all you need to know if your users have the right to install
printers in your domain.
If they do not ,you can not do it by login script. Or the first login on the
workstation must be a administrator.
What I did  made a directory on the netlogon share with the name of the
printer. Copied the driver/files there.
Used kixtart to ask the registry if the printer exists, if not it is
installed (ex.: Lexmark E352db):

$RETURNVALUE = existkey("HKEY_Local_Machine\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Print\Printers\Lexmark E352dn")
IF NOT $RETURNVALUE = 0 

shell "\\tpdc\netlogon\printer.bat"


else


ENDIF


Here now printer.bat. To overcome the restrictions of the users I do it with
runas/sanur as administrator:

runas /user:tpdc\administrator \\tpdc\netlogon\sdre352dn.bat
|\\tpdc\netlogon\sanur.exe /i \\tpdc\netlogon\pw.txt

Now the installation with sdre352dn.bat:

echo make the ip port of the printer
cscript C:\Windows\System32\prnport.vbs -a -r IP_192.168.133.10 -h
192.168.133.10 -o raw -n 9100
echo install driver to workstations

rundll32 printui.dll,PrintUIEntry /if /b "Lexmark E352dn" /f
\\tpdc\netlogon\Lexmark\LMABK740.inf  /r "IP_192.168.133.10" /m "Lexmark
E352dn" 

rundll32 printui.dll,PrintUIEntry /y /n "Lexmark E352dn"



Good Luck
Daniel

-----------------------------------------------
EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: mueller at tropenklinik.de
Internet: www.tropenklinik.de
-----------------------------------------------
-----Ursprüngliche Nachricht-----
Von: samba-bounces at lists.samba.org [mailto:samba-bounces at lists.samba.org] Im
Auftrag von marcos gonzalez
Gesendet: Dienstag, 16. November 2010 08:39
An: gaiseric.vandal at gmail.com
Cc: samba at lists.samba.org
Betreff: Re: [Samba] how to map shared folders when start user profile in XP

Hi

yes, Im interested in a login script, but Im a newbie with this and I don't
know where I can take examples. Inside samba documentacion there are no the
sufficient complex examples and in my case Im interested to made a script
for every user.

Suggestions?

Thnaks

2010/11/15 Gaiseric Vandal <gaiseric.vandal at gmail.com>

> Are you using a login script?  That should take care of mapping shared
> folders to drive letters.
>
> You can't use login scripts to setup printers.   If the printers are
> properly shared from a Windows server or Samba server users should be able
> to easily locate them in "My Network Places."
>
>
>
> On 11/12/2010 06:33 AM, marcos gonzalez wrote:
>
>> Hi guys
>>
>> I have configured samba 3.3.2 in a domain with Xp clients and I would
like
>> to config inside clients the shared folders how units when users starts,
>> and
>> the printers too. Im looking for this and the information is very
>> confused,
>> and I dont know which the fast option for users. Suggestions?
>>
>> Thanks
>>
>>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba



More information about the samba mailing list