LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 06-16-2006, 09:00 PM   #1
sixerjman
Member
 
Registered: Sep 2004
Distribution: Debian Tesing / Unstable
Posts: 166
Blog Entries: 1

Rep: Reputation: 30
Autofs auto.smb attempts to mount printer drivers


In the Debian Autofs package the auto.smb script contains the following line:

/Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 }

SAMBA for some reason lists printer drivers as 'Disk' shares:

IPC|IPC$|Remote IPC
Disk|print$|Printer Drivers
Disk|C|
Printer|HPLJ4L|HP LaserJet 4L

This produces error messages when a mount is attempted for

//machinename/print

which doesn't exist:

automount[17409]: mount(generic): calling mount -t cifs -s -o rw,credentials=/etc/auto.cifs.DELL3000
//DELL3000/print /smb/DELL3000/print
Jun 16 19:32:50 EMACH433 automount[17409]: >> retrying with upper case share name
Jun 16 19:32:50 EMACH433 automount[17409]: >> mount error 6 = No such device or address

Any way to either modify the awk program in auto.smb to exclude the 'print$' service or modify the smbclient
options to list hard drives only?
 
Old 06-20-2006, 08:50 PM   #2
sixerjman
Member
 
Registered: Sep 2004
Distribution: Debian Tesing / Unstable
Posts: 166
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Fixed by inserting a couple of 'if' statements to weed out the 'printer driver' shares reported by Win9x (PRINTER$) and WinXP (print$):

BEGIN { ORS=""; first=1 }
/Disk/ { if (first) { print opts; first=0 }; if ($2 != "PRINTER$") { if ($2 != "print$") print " \\\n\t /" $2, "://" key "/" $2 } }
END { if (!first) print "\n"; else exit 1 }
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
smb mount folders disappear on mount & konqueror smb fails: network unreachable tisource Linux - Networking 1 10-17-2007 01:30 AM
Autofs auto.smb attempts to mount printer drivers sixerjman Linux - Software 0 06-16-2006 08:31 PM
using autofs to auto mount my usb drives DesertWolf0132 Slackware 8 07-30-2004 11:27 AM
how to mount fstab vs autofs rrich100 Red Hat 1 11-14-2003 12:46 AM
autofs enabled in kernel but auto.mount and auto.master are NOT in /etc! Alybyzrp Linux - General 0 11-11-2003 01:26 PM


All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration