Fedora Linux Support Community & Resources Center
  #1  
Old 10th August 2005, 05:52 PM
icthy Offline
Registered User
 
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 173
can someone post their /etc/auto.net file?

Hi, I'm trying to mount a remote filesystem via autofs (on FC3), but when I look at /var/log/messages, I keep getting errors from auto.net. I think my auto.net file is messed up. Can someone please post what they use? Alternatively, can someone plese tell me what's wrong with mine? I get an error on the last line of the file (the line that begins with home -fstype), where I'm trying to tell it to mount the directory /home/me that lives on the computer at 128.150.72.58
#!/bin/sh

# $Id: auto.net,v 1.5 2003/09/29 08:22:35 raven Exp $

# Look at what a 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
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid"

# 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="/usr/sbin/showmount --no-headers -e $key"

$SHOWMOUNT | 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 }'
home -fstype=nfs,rw,hard,intr 128.150.72.58:/home/me
Thanks,

Derek
Reply With Quote
  #2  
Old 10th August 2005, 05:56 PM
Heon2574 Offline
Registered User
 
Join Date: May 2004
Posts: 206
mine

Code:
#!/bin/bash

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

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

# Look at what a 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
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid"

# 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 -n +2"

for P in /bin /sbin /usr/bin /usr/sbin
do
        for M in showmount kshowmount
        do
                if [ -x $P/$M ]
                then
                        SMNT=$P/$M
                        break
                fi
        done
done

[ -x $SMNT ] || exit 1

# Newer distributions get this right
SHOWMOUNT="$SMNT --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 }
        '
__________________
athlon 64 3700+ san diego | asus a8n5x | x1900xt | 1GB

Compaq Presario R3000 (DP533AV) | Athlon XP-M 2800+ | 512MB | 54g WLAN | Geforce4 MX 420 Go 32M | 40GB | 15.4" WXGA
Reply With Quote
  #3  
Old 10th August 2005, 05:58 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
Derek,
auto.net is not a regular automounter map, it's used for mounting /net/<hostname> automagically. Use auto.misc instead and make sure it's uncommented in auto.master.

C.
__________________
Want to get better answers? Learn to ask better questions!
fukka.co.uk for spamassassin rules and random garbage.
Reply With Quote
  #4  
Old 10th August 2005, 06:09 PM
icthy Offline
Registered User
 
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 173
Thanks Heon.

to fsck, thanks for the advice. Yeah, I'm trying to mount desktop files on my laptop, and thought autofs was the way to go. I'm a total newbie with respect to networking, and I've been following the instructions in http://forums.fedoraforum.org/forum/...ad.php?t=64680 by kosmosik, but it's not yet working. It's clear the last line of my file is wrong, but I'm not sure why.
Reply With Quote
  #5  
Old 10th August 2005, 06:14 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
That file is a shell script, not a mounter map file. If you put automounter lines in it you'll get all sorts of errors about "home: command not found" or suchlike.
Take the line out of auto.net, and put it in auto.misc. Then edit auto.master and make sure the auto.misc line does not begin with a #. Then restart the automounter (service autofs condrestart), cd to /misc/home and you should be away.
Also, check the autofs service is set to start on boot (chkconfig --list autofs).
C.
__________________
Want to get better answers? Learn to ask better questions!
fukka.co.uk for spamassassin rules and random garbage.
Reply With Quote
  #6  
Old 10th August 2005, 06:18 PM
marcos Offline
Registered User
 
Join Date: Nov 2004
Location: São Paulo, Brazil
Age: 43
Posts: 112
That's mine:

#!/bin/bash

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

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

# Look at what a 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
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid"

# 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 -n +2"

for P in /bin /sbin /usr/bin /usr/sbin
do
for M in showmount kshowmount
do
if [ -x $P/$M ]
then
SMNT=$P/$M
break
fi
done
done

[ -x $SMNT ] || exit 1

# Newer distributions get this right
SHOWMOUNT="$SMNT --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 }
'
Reply With Quote
  #7  
Old 10th August 2005, 06:58 PM
icthy Offline
Registered User
 
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 173
I'm starting to see now. Thanks marcos and especially fsck. It looks like the directions I followed did things in an odd way. I've fixed auto.misc, auto.net, and auto.master, and it seems they are working fine. But it looks like I still have an issue. When I try and cd to /misc/home, nothing's there. /var/log/messages shows:
Code:
Aug 10 13:47:15 dereklaptop automount[9952]: >> mount to NFS server '128.150.72.58' failed: server is down.
Aug 10 13:47:15 dereklaptop automount[9952]: mount(nfs): nfs: mount failure 128.150.72.58:/home/derek on /misc/home
Aug 10 13:47:15 dereklaptop automount[9952]: failed to mount /misc/home
/etc/exports on the server says:
Code:
/home/derek/      128.150.72.*(rw,sync,no_root_squash)
and /usr/sbin/exportfs says:
Code:
/home/derek        128.150.72.*
I've checked and the nfs service is running on both machines, and neither machine has anything in the hosts.deny file. I think I'm getting close, but I'm not sure what to do next. Can anyone help?
Reply With Quote
  #8  
Old 10th August 2005, 07:05 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
You might well be in the realm of selinux or the firewall settings now, I suggest they would be the next place to look. Check out system-config-securitylevel.
__________________
Want to get better answers? Learn to ask better questions!
fukka.co.uk for spamassassin rules and random garbage.
Reply With Quote
  #9  
Old 10th August 2005, 07:32 PM
icthy Offline
Registered User
 
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 173
Thanks fsck. Your posts have been very helpful.
Reply With Quote
  #10  
Old 10th August 2005, 07:34 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
No problem Let us know how you get on.
__________________
Want to get better answers? Learn to ask better questions!
fukka.co.uk for spamassassin rules and random garbage.
Reply With Quote
  #11  
Old 10th August 2005, 08:00 PM
icthy Offline
Registered User
 
Join Date: Jun 2005
Location: Washington D.C. area
Posts: 173
I fixed the problem. Turns out I had to change the line in /etc/exports from this:

/home/derek/ 128.150.72.0(rw,synch,no_root_squash)

to this:

/home/derek 128.150.72.0/24(rw,synch,no_root_squash)

I'm not sure what was wrong with the previous statement, but am a happy camper now. Thanks again to everyone.
Reply With Quote
  #12  
Old 10th August 2005, 08:30 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
Ah. The first was a specific IP, the second allows a range of IP addresses to connect. In this case, anything on the 128.150.72.x subnet.
__________________
Want to get better answers? Learn to ask better questions!
fukka.co.uk for spamassassin rules and random garbage.
Reply With Quote
Reply

Tags
file, or etc or autonet, post

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can someone post his smb.conf file? ariskk Servers & Networking 11 6th November 2007 07:29 AM
Can anyone using FC4 post their 'core' repository file? joe.pelayo Using Fedora 2 16th February 2007 04:44 AM
Automount USB key stopped working. Can someone post /etc/auto.master /etc/auto.misc? beissemj Hardware & Laptops 4 24th January 2007 02:08 AM
post-install additional LVM volume won't auto-mount r0dzilla Using Fedora 2 23rd October 2006 10:50 PM
Please post your ifcfg-wireless file. I need the original one. JesusDM Servers & Networking 11 2nd April 2005 04:29 PM


Current GMT-time: 11:18 (Friday, 25-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat