Am Freitag, 1. Juni 2007 schrieb ext Alexander Skwar: > I'd like to get something like this for Samba hosts as well. As a > (dysfunctional :() start, I've hacked up a "auto.smb" script, which > you can find at <http://askwar.pastebin.ca/527240>. If invoked on the > command line, it returns: > > [EMAIL PROTECTED] /dev/shm $ /etc/autofs/auto.smb winfs001 > -fstype=smbfs,credentials=/home/askwar/winfs001.cred \ > R$ ://winfs001/R$ \ > HOME ://winfs001/HOME \ > C$ ://winfs001/C$ \ > DAITMeeting ://winfs001/DAITMeeting \ > DEPT ://winfs001/DEPT \ > APPL ://winfs001/APPL \ > F$ ://winfs001/F$ \ > ADMIN$ ://winfs001/ADMIN$ \ > WORKGROUPS ://winfs001/WORKGROUPS \ > D$ ://winfs001/D$ \ > PUBLIC ://winfs001/PUBLIC \ > E$ ://winfs001/E$ > > Those are all the shares on the winfs001 host. In auto.master, I've got > the following: > > /smb /etc/autofs/auto.smb > > But it does not work :( When I do a "ls /smb/winfs001/DEPT", I get: > > ls: cannot access /smb/winfs001/DEPT: No such file or directory
Hmm, I guess the output of your script is wrong. Put this line into the awk
part instead:
{ if (first) { print opts; first=0 }; print " \\\n\t/"$1"\t://"host"/"$1 }
Nice Script, thanks :-) Only drawback of the script approach is that it
makes automount's "-ghost" option useless.
Bye...
Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: [EMAIL PROTECTED]
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
signature.asc
Description: This is a digitally signed message part.

