LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Learning NFS - 'RPC Error: Authentication error.' (https://www.linuxquestions.org/questions/linux-newbie-8/learning-nfs-rpc-error-authentication-error-814561/)

arashi256 06-16-2010 01:43 PM

Learning NFS - 'RPC Error: Authentication error.'
 
Hi,

I have two machines (Fedora 13 as server, Scientific Linux RHEL 5.1 as the client), one acting as the NFS server and one acting as the client. My config for the NFS server is as follows: -

/etc/exports
Code:

/usr/local/nfs 192.168.1.0/255.255.255.0(ro,sync)
/etc/hosts.allow
Code:

portmap: 192.168.1.0/24
lockd: 192.168.1.0/24
rquotad: 192.168.0/24
mountd: 192.168.0/24
statd: 192.168.0/24

/etc/hosts.deny
Code:

portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

/etc/sysconfig/nfs
Code:

LOCKD_TCPPORT=48620
LOCKD_UDPPORT=48620
MOUNTD_PORT=48621
STATD_PORT=48622
STATD_OUTGOING_PORT=48623
RQUOTAD=no
RQUOTAD_PORT=48624

I have opened the following ports:-
Code:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 48620 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 48621 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 48622 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 48623 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 48624 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 111 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 48620 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 48621 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 48622 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 48623 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 48624 -j ACCEPT

I start the following services on the NFS server: -
Code:

/etc/init.d/nfslock start
/etc/init.d/nfs start
/etc/rc.d/init.d/netfs start

and on the client, I try and connect to the NFS server with: -
Code:

# mount 192.168.1.60:/nfs /mnt/nfs
...and get the following error.
Code:

mount: mount to NFS server '192.168.1.60' failed: RPC Error: Authentication error.
What am I doing wrong? Not used NFS before.

arashi256 06-16-2010 03:23 PM

Ah, figured it - when mounting the NFS share on the client, you need to supply the *absolute* path to the share, like: -

mount -t nfs -o ro 192.168.1.60:/usr/local/nfs /mnt/nfs

Phew!


All times are GMT -5. The time now is 08:53 PM.