PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Automatisches Mappen



FineLine
07.06.04, 20:08
Hi

Ich habe eine Samba-Domäne erstellt. Nun hätte ich gerne, dass wenn sich der Benutzer anmeldet, es automatisch 2 Laufwerke mappt. Das Gruppenlaufwerk und dieses mit seinen persönlichen Daten.
Das Batchfile sieht folgendermassen aus:

@ECHO off

rem HOME-Drive

net use L: \\svr01\%USERNAME%\Documents
net use M: \\svr01\gruppe

Wie kann ich es anstellen, dass dieses Batchfile automatisch ausgeführt wird und auch automatisch bei jedem neuen Benutzer vorhanden ist?
Cheers

aheinhold
07.06.04, 22:11
Hallo,

schau dir mal die manpage zur smb.conf an. Suche nach logon script bzw. netlogon.



This option is only useful if Samba is set up as a logon server.
Default: logon script =
Example: logon script = scripts\%U.bat


logon script (G)
This parameter specifies the batch file (.bat) or
NT command file (.cmd) to be downloaded and run on
a machine when a user successfully logs in. The
file must contain the DOS style CR/LF line endings.
Using a DOS-style editor to create the file is rec-
ommended.

The script must be a relative path to the [netlo-
gon] service. If the [netlogon] service specifies a
path of /usr/local/samba/netlogon, and logon script
= STARTUP.BAT, then the file that will be down-
loaded is:

/usr/local/samba/netlogon/STARTUP.BAT

The contents of the batch file are entirely your
choice. A suggested command would be to add NET
TIME \\SERVER /SET /YES, to force every machine to
synchronize clocks with the same time server.
Another use would be to add NET USE U:
\\SERVER\UTILS for commonly used utilities, or

NET USE Q: \\SERVER\ISO9001_QA.fi
for example.

Les dir den Rest auch noch mal durch und bau das ganze in deine Global-Section.

pibi
08.06.04, 12:19
Wie kann ich es anstellen, dass dieses Batchfile automatisch ausgeführt wird und auch automatisch bei jedem neuen Benutzer vorhanden ist?
CheersWir reden hier von Win-Clients, die auf Samba zugreifen sollen, richtig? Welche Win-Version?

Bei W2k wuerde es zB. so gehen: Lege einen Link auf dieses File in den Autostart-Directory eines jeden Users. Oder wenn alle User an dieser Maschine das File ausfuehren sollen, gehoert der Link in All-Users-Autostart. Und fuer neue User entsprechend in Default-User-Autostart.

Gruss Pit.