Re: Auto.net syntax.

From: Dr Balwinder Singh Dheeman (bsd.sanspam_at_cto.homelinux.net)
Date: 11/11/04


Date: Thu, 11 Nov 2004 09:27:55 +0530


On 11/10/04 20:16, George wrote:
> I've searched through many old records on auto.net, but can't quite
> find the one hit that helps.
>
> I have a number of Unix flavors on the network and all are happy
> either with a +auto.master, +auto_master, or their own auto_master (or
> .) file. Either way, the contents of the NIS server file or the
> client file basically includes:
>
> /net -hosts -intr,nosuid,nobrowse. (give or take a parameter)
>
> The Linux system does not respond to the /net entry from the master.
> Perhaps it is just a syntax difference, not sure. I have been working
> with this Linux systems local auto.master and have the following:
>
> /net file:auto.net -intr,nosuid,nodev,rw,soft
>
> That seems ok. The only glitch I am having is in the auto.net file. I
> have it partially working with:
>
> osprey -rw,soft,intr osprey:/local/disk1
>
> Osprey exports /local/disk1 and I can get to it via cd /net/osprey.
> What I CAN'T figure out is out to setup auto.net so that if I cd
> /net/osprey I see ALL its exported(shared) file systems as is the case
> with the other systems using the NIS /net or their local /net entry.
> For example if I log into the SGI system raven and cd /net/osprey I
> see all osprey's (a Solaris system) shared files systems and from
> there cd into the subdirectory of my choosing. I have been trying to
> work with the * and the & wildcards, but have not hit upon the correct
> combo yet.
>
> Any ideas or suggestions would be most valuable.

On my Knoppix I found a wroking copy of an auto.net (see attatchments)
and even created an auto.smb for samba shares based on auto.net ideas.
both of these are working for me.

The $HOME/.sambarc should contain:

username=sambausername
password=sambapassword

One thing more, you need to install latest autofs and mount packages.

HTH.

-- 
Dr Balwinder Singh Dheeman            Registered Linux User: #229709
CLLO (Chief Linux Learning Officer)   Machines: #168573, 170593, 259192
Anu's Linux@HOME                      Distros: Knoppix, Fedora, FreeBSD
More: http://anu.homelinux.net/~bsd/  Visit: http://counter.li.org/

# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).

# KNOPPIX automounts for floppy and cdrom(s), see knoppix-autoconfig
/mnt/auto /etc/automount.sh --timeout=20

/var/autofs/misc /etc/auto.misc --timeout=30
/var/autofs/net /etc/auto.net --timeout=20
/var/autofs/smb /etc/auto.smb --timeout=20



#!/bin/sh

# $Id: //depot/autofs-4.0/samples/auto.net#6 $

# Look at what an host is exporting to determine what we can mount.
# This is very simple, but it appears to work surprisingly well

key="$1"

# Add "nosymlink" here if you want to suppress symlinking local filesystems
# Note: "nonstrict" is now set by default, remove it if you don't want it.
opts="-fstype=nfs,users,hard,intr,nonstrict"

# Showmount comes in a number of names and varieties. "showmount" is
# typically an older version which accepts the '--no-headers' flag
# but ignores it. "kshowmount" is the newer version installed with knfsd,
# which both accepts and acts on the '--no-headers' flag.
#SHOWMOUNT="kshowmount --no-headers -e $key"
#SHOWMOUNT="showmount -e $key | tail +2"

# Newer distributions get this right
SHOWMOUNT="/sbin/showmount --no-headers -e $key"

$SHOWMOUNT | LC_ALL=C sort +0 | \
        awk -v key="$key" -v opts="$opts" -- '
        BEGIN { ORS=""; first=1 }
                { if (first) { print opts; first=0 };
                  print " \\\n\t" $1, key ":" $1 }
        END { if (!first) print "\n"; else exit 1 }
        '



#!/bin/sh

# $Id: //depot/autofs-4.0/samples/auto.smb#6 $

# Look at what an host is sharing to determine what we can mount. This is
# very simple, but it appears to work surprisingly well.

key="$1"

# FIXME: Override a bug/feature in autofs; it's working for only me, but is
# genric enough to be usable by others
[ -z "$HOME" ] || HOME="/home/bsd"

# Get username from $HOME/.sambarc
usr=`awk -F= '/username/ {print $2}' $HOME/.sambarc`

# Add/edit other applicable smbfs/mount options here.
# Note: "nonstrict" is now set by default, remove it if you don't want it.
opts="-fstype=smb,credentials=$HOME/.sambarc,uid=$usr,gid=$usr,fmask=664,dmask=775,nonstrict"

# List samba/windows/lan manager shares available on target host (key).
LISTMOUNTS="/usr/bin/smbclient -A $HOME/.sambarc -L $key"

$LISTMOUNTS | LC_ALL=C sort +0 | \
        awk -v key="$key" -v opts="$opts" -- '
        BEGIN { ORS=""; first=1 }
                { if (first) { print opts; first=0 };
                  if ($2 == "Disk") {print " \\\n\t" "/mnt/" $1, "//" key "/" $1 }}
        END { if (!first) print "\n"; else exit 1 }
        ' | grep -v '\$'



Relevant Pages

  • Re: NFS mount problem between zOS and Linux
    ... I was having some strange issues with my z/OS to linux system and had to ... The typical mount syntax involves ... Security Manager on z/OS could authenticate ... send email to listserv@xxxxxxxxxxxxxxx with the message: INFO IBM-MAIN ...
    (bit.listserv.ibm-main)
  • Re: Windows XP license legal question
    ... the same exact system WMP work much better. ... Obviously in a Linux system they don't ... Knoppix PE is knoppix live and like Bart PE, ... PE, Microsoft Windows XP Embedded. ...
    (microsoft.public.windowsxp.general)
  • Re: Multinet on VMS 5.5 please HELP !
    ... You could burn it on a CD and mount the CD from the VAX environment. ... You could install DECnet on a Linux system and send it that way: ... Quayle Consulting Inc. ...
    (comp.os.vms)
  • Re: Fedora and USB ??
    ... if what you want is to be able to transfer files from you Linux system ... to the SD card on the Motorola Android, you need to 'allow' it on the ... 'Mount' - it only will charge your phone but will not allow a computer ... if i push on usb icon the? ...
    (Fedora)
  • Re: What is this for?
    ... making a nice spot for a new 14.04 ... partition, in this case /dev/sda9. ... it's Linux system. ... You could mount it and have a look at what's in it, ...
    (uk.comp.os.linux)