LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-22-2006, 05:04 AM   #1
special.michael
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
samba automounts


hi,

i'm trying to setup Autofs & samba
running ubuntu dapper, the apt-get setup most things for me, but my samba mount doesn't recognize paths


as in
Code:
michael@theburrow:/etc$ ls /smb/storage
admins       clans      Customers     development  executive   Galway-BU    home 
michael@theburrow:/etc$ ls /smb/storage/home
admins       clans      Customers     development  executive   Galway-BU    home  
michael@theburrow:/etc$ ls /smb/storage/home/anygarbagetext
admins       clans      Customers     development  executive   Galway-BU    home
not being too familiar with awk or sambaclient, I can't decipher what's going wrong

can anyone point me in the right direction?




my auto.smb is
Code:
#!/bin/bash

# $Id: auto.smb,v 1.3 2005/04/05 13:02:09 raven Exp $

# This file must be executable to work! chmod 755!

key="$1"
opts="-fstype=smbfs"

for P in /bin /sbin /usr/bin /usr/sbin
do
        if [ -x $P/smbclient ]
        then
                SMBCLIENT=$P/smbclient
                break
        fi
done

[ -x $SMBCLIENT ] || exit 1

$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
        BEGIN   { ORS=""; first=1 }
        /Disk/  { if (first) { print opts; first=0 }; 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
PSP Automounts Read Only computergee Linux - Hardware 0 04-05-2006 07:11 PM
hda and hdb automounts nicely, but sda does not Navyblue Linux - Newbie 7 08-21-2005 11:53 AM
I need the content from thegoldenear.org/toolbox/unices/samba/samba-setup.html rtg2001 Linux - Networking 1 08-05-2004 05:54 PM
cdrom no longer automounts and users can't cd there on fedora core 2 cjennings Linux - Hardware 1 08-04-2004 09:54 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:20 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
Open Source Consulting | Domain Registration