NFS: username and password on fstab

How to pass username and password for mounting NFS using /etc/fstab?

Thanks,
Fabrizio

On 28/07/17 15:04, restori wrote:
[color=blue]

How to pass username and password for mounting NFS using /etc/fstab?[/color]

Include “user=” and “password=” in the mount options.

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

Thanks for response,
Initialy I’ve used username=…, not user.
Now the sintax is as follow:

nas:/backup /bk_nfs nfs user=nasusr,password=naspassword 0 0

but mount - a returns:
mount.nfs: an incorrect mount option was specified

:frowning:

I’m not able to find the related documentiations

Fabrizio

On 28/07/17 15:54, restori wrote:
[color=blue]

Thanks for response,
Initialy I’ve used username=…, not user.
Now the sintax is as follow:

nas:/backup /bk_nfs nfs user=nasusr,password=naspassword 0 0

but mount - a returns:
mount.nfs: an incorrect mount option was specified

:-([/color]

Sorry, try replacing “user=” with “username=”.
[color=blue]

I’m not able to find the related documentiations[/color]

man mount
man fstab

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

Sorry, I’ve found my mistake…

I’m was trying to mount NFS, but the remote fs is cifs…
A stupid mistake that makes me waste time. :frowning:

The right sintax:
nas:/backup /bk_nfs cifs user=nasusr,passwd=naspassword 0 0

I’ve already read the man and other :-), of course.

Thanks,
Fabrizio

One upgrade.

Now mounting from fstab is working using command mount -a, but not at boot.
May be some services are not ready at mount time.
Probably Cifs or DNS (The mount is with cisf’s server name and not with IP address, only one dns is available and it’s on the same server). I’ll’ do some test when I can restart the server.

Fabrizio