Dirk Heinrichs <[EMAIL PROTECTED]> wrote: > Am Freitag, 1. Juni 2007 schrieb ext Dirk Heinrichs:
>> Hmm, I guess the output of your script is wrong. Guess so as well :) >> Put this line into the >> awk part instead: >> >> { if (first) { print opts; first=0 }; print " \\\n\t/"$1"\t://"host"/"$1 >> } Thx. This works. The difference is, that you're printing "/DEPT", while I was printing just "DEPT" - IOW: you added a / before the Sharename. Strange that this is required, though, because in a static map, the / isn't required. Oh, well. As long as it works ;) > However, xxx$ shares don't work for me, which they do when entered in a > static auto.windows. Yep. If you have a close look at the syslog, you'll find: D ://winfs001/D So, for some reason, it's loosing the $. Maybe add quotes? Or escape? Let's see... Yep. Escaping seems to be in order. See http://askwar.pastebin.ca/527548 for the new version of the script. --- post.527240 2007-06-01 04:42:37.284685294 -0600 +++ post.527548 2007-06-01 04:42:37.284685294 -0600 @@ -6,8 +6,11 @@ /usr/bin/smbclient -A "$cred_file" -L "$host" 2>/dev/null | \ grep Disk | \ + sed s/\\$/\\\\$/g | \ awk -v host="$host" -v opts="$opts" -- ' BEGIN { ORS=""; first=1 } - { if (first) { print opts; first=0 }; print " \\\n\t", $1, "\t ://" host "/" $1 } + { if (first) { print opts; first=0 }; print " \\\n\t /"$1" \t ://"host"/"$1 } END { print "\n"; } ' + + http://askwar.pastebin.ca/diff.php?id1=527240&id2=527548 This fails with a much better error message for me ;) Jun 1 12:39:23 winnb000488 automount[17344]: mount(generic): failed to mount //winfs001/D$ (type smbfs) on /smb/winfs001/D$ Jun 1 12:39:23 winnb000488 automount[17344]: >> 17411: tree connect failed: ERRDOS - ERRnoaccess (Access denied.) Jun 1 12:39:23 winnb000488 automount[17344]: >> SMB connection failed Yep. I'm not allowed access to D$. This can very well be. Cheers and thanks for the help! Alexander Skwar -- [EMAIL PROTECTED] mailing list