bad export list line NFS

This is my /etc/exports

Code:
/cdrom -ro *.my.domain
/mnt/files -ro 192.168.10.0/24

On the client, i type
Code:
sudo mount -t nfs someserver:/cdrom /mnt
output was
Code:
mount.nfs: access denied by server while mounting someserver:/cdrom

I checked /var/log/messages on someserver and here is what I found
Code:
Feb 19 14:14:29 imp mountd[593]: bad host 192.168.10.0/24, skipping
Feb 19 14:14:29 imp mountd[593]: bad exports list line /mnt/files -ro 192.168.10.0/24

Feb 19 14:14:29 imp mountd[593]: bad host *.my.domain, skipping
Feb 19 14:14:29 imp mountd[593]: bad exports list line /cdrom -ro *.my.domain

I have read a tutorial about specifying the whole domain or ip range... what could be the problem? I'm using FreebSD 7 as the nfs server and an ubuntu PC as the nfs client.

Thanks
 
Your netmask is wrong. IIRC you can't use CIDR notation.
 
SirDice said:
Your netmask is wrong. IIRC you can't use CIDR notation.


tried to change my /etc/exports to
Code:
/cdrom -ro 192.168.10.0/255.255.255.0


output is:
Code:
Feb 19 16:41:02 imp mountd[593]: bad host 192.168.10.0/255.255.255.0, skipping
Feb 19 16:41:02 imp mountd[593]: bad exports list line /cdrom -ro 192.168.10.0/255.255.255.0
 
Here's one of mine that works:

Code:
/usr/ports -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0

man exports for more info.

Edit: You can use CIDR notation but it should be something like this:

Code:
/usr/ports -ro -maproot=0 -network 192.168.1.0/24
 
Thanks it worked...


However i was wondering about why this

Code:
/cdrom -ro *.my.domain

doesn't work... if i specify ip address then ok[it works].

But with *.my.domain it fails.... Do i have to do the maproot here?

Thanks again
 
The maproot is just to make sure the root uids are the same on the client and server.

As for *.my.domain, you would need to create a netgroup.

man exports:
The third component of a line specifies the host set to which the line
applies. The set may be specified in three ways. The first way is to
list the host name(s) separated by white space. (Standard Internet
``dot'' addresses may be used in place of names.) The second way is to
specify a ``netgroup'' as defined in the netgroup file (see netgroup(5)).
The third way is to specify an Internet subnetwork using a network and
network mask that is defined as the set of all hosts with addresses
within the subnetwork. This latter approach requires less overhead
within the kernel and is recommended for cases where the export line
refers to a large number of clients within an administrative subnet.
 
Back
Top