1 |
Am Freitag, 1. Juni 2007 schrieb ext Alexander Skwar: |
2 |
> I'd like to get something like this for Samba hosts as well. As a |
3 |
> (dysfunctional :() start, I've hacked up a "auto.smb" script, which |
4 |
> you can find at <http://askwar.pastebin.ca/527240>. If invoked on the |
5 |
> command line, it returns: |
6 |
> |
7 |
> askwar@winnb000488 /dev/shm $ /etc/autofs/auto.smb winfs001 |
8 |
> -fstype=smbfs,credentials=/home/askwar/winfs001.cred \ |
9 |
> R$ ://winfs001/R$ \ |
10 |
> HOME ://winfs001/HOME \ |
11 |
> C$ ://winfs001/C$ \ |
12 |
> DAITMeeting ://winfs001/DAITMeeting \ |
13 |
> DEPT ://winfs001/DEPT \ |
14 |
> APPL ://winfs001/APPL \ |
15 |
> F$ ://winfs001/F$ \ |
16 |
> ADMIN$ ://winfs001/ADMIN$ \ |
17 |
> WORKGROUPS ://winfs001/WORKGROUPS \ |
18 |
> D$ ://winfs001/D$ \ |
19 |
> PUBLIC ://winfs001/PUBLIC \ |
20 |
> E$ ://winfs001/E$ |
21 |
> |
22 |
> Those are all the shares on the winfs001 host. In auto.master, I've got |
23 |
> the following: |
24 |
> |
25 |
> /smb /etc/autofs/auto.smb |
26 |
> |
27 |
> But it does not work :( When I do a "ls /smb/winfs001/DEPT", I get: |
28 |
> |
29 |
> ls: cannot access /smb/winfs001/DEPT: No such file or directory |
30 |
|
31 |
Hmm, I guess the output of your script is wrong. Put this line into the awk |
32 |
part instead: |
33 |
|
34 |
{ if (first) { print opts; first=0 }; print " \\\n\t/"$1"\t://"host"/"$1 } |
35 |
|
36 |
Nice Script, thanks :-) Only drawback of the script approach is that it |
37 |
makes automount's "-ghost" option useless. |
38 |
|
39 |
Bye... |
40 |
|
41 |
Dirk |
42 |
-- |
43 |
Dirk Heinrichs | Tel: +49 (0)162 234 3408 |
44 |
Configuration Manager | Fax: +49 (0)211 47068 111 |
45 |
Capgemini Deutschland | Mail: dirk.heinrichs@×××××××××.com |
46 |
Wanheimerstraße 68 | Web: http://www.capgemini.com |
47 |
D-40468 Düsseldorf | ICQ#: 110037733 |
48 |
GPG Public Key C2E467BB | Keyserver: www.keyserver.net |