Failed to pass credentials to nfs mount
I am running CentOS 7 and need to mount an NFS share which is protected by credentials. I have read the nfs, mount, mount.nfs manuals and can't find the right options that work! I think the right options are 'user' and 'pass', but I've tried 'username' and 'password' and everything inbetween, but I get:
mount -t nfs -o user=root,pass=mypass lserver:/root /mnt/d0
mount.nfs: an incorrect mount option was specified
Can someone tell me the right syntax/options to make this work? (It really shouldn't be this hard)
mount nfs options
add a comment |
I am running CentOS 7 and need to mount an NFS share which is protected by credentials. I have read the nfs, mount, mount.nfs manuals and can't find the right options that work! I think the right options are 'user' and 'pass', but I've tried 'username' and 'password' and everything inbetween, but I get:
mount -t nfs -o user=root,pass=mypass lserver:/root /mnt/d0
mount.nfs: an incorrect mount option was specified
Can someone tell me the right syntax/options to make this work? (It really shouldn't be this hard)
mount nfs options
add a comment |
I am running CentOS 7 and need to mount an NFS share which is protected by credentials. I have read the nfs, mount, mount.nfs manuals and can't find the right options that work! I think the right options are 'user' and 'pass', but I've tried 'username' and 'password' and everything inbetween, but I get:
mount -t nfs -o user=root,pass=mypass lserver:/root /mnt/d0
mount.nfs: an incorrect mount option was specified
Can someone tell me the right syntax/options to make this work? (It really shouldn't be this hard)
mount nfs options
I am running CentOS 7 and need to mount an NFS share which is protected by credentials. I have read the nfs, mount, mount.nfs manuals and can't find the right options that work! I think the right options are 'user' and 'pass', but I've tried 'username' and 'password' and everything inbetween, but I get:
mount -t nfs -o user=root,pass=mypass lserver:/root /mnt/d0
mount.nfs: an incorrect mount option was specified
Can someone tell me the right syntax/options to make this work? (It really shouldn't be this hard)
mount nfs options
mount nfs options
asked Feb 1 '17 at 22:18
TSGTSG
3892721
3892721
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Specifying username
and password
are options for cifs (samba)
, but not nfs
. According to this CentOS Documentation:
NFS controls who can mount an exported file system based on the host making the mount request, not the user that actually uses the file system. Hosts must be given explicit rights to mount the exported file system. Access control is not possible for users, other than through file and directory permissions.
I missed that! But why is 'user' a valid parameter for NFS mounts?
– TSG
Feb 1 '17 at 23:44
1
Where do you see that? There is nouser
option inman mount.nfs
.
– Timothy Martin
Feb 1 '17 at 23:51
When I try adding parameters, they all give invalid option errors, but the 'user' option does NOT generate an invalid option error
– TSG
Feb 2 '17 at 1:06
See @Adonis' answer for whyuser=
exists
– Ryan V. Bissell
Apr 20 '18 at 21:58
add a comment |
The user
option is related to allow any users on your system allowed to mount the file system. See the "non-superuser mounts" of man mount
add a comment |
sudo mount -t nfs -O user=root,pass=mypass lserver:/root /mnt/d0
Notice that the 'O' is a capital letter.
add a comment |
This works under CentOS
mount.cifs //192.168.0.123/myshare /mnt/myshare -o user=myuser
(it asks for the password - you can add it on the commandline probably via pass=)
Run this by itself to see all the options:
mount.cifs
Usage: mount.cifs -o
Mount the remote target, specified as a UNC name, to a local
directory.
Options:
user=
pass=
dom=
Less commonly used options:
credentials=,guest,perm,noperm,setuids,nosetuids,rw,ro,
sep=,iocharset=,suid,nosuid,exec,noexec,serverino,
mapchars,nomapchars,nolock,servernetbiosname=
directio,nounix,cifsacl,sec=,sign,fsc
Options not needed for servers supporting CIFS Unix extensions
(e.g. unneeded for mounts to most Samba versions):
uid=,gid=,dir_mode=,file_mode=,sfu
Rarely used options:
port=,rsize=,wsize=,unc=,ip=,
dev,nodev,nouser_xattr,netbiosname=,hard,soft,intr,
nointr,ignorecase,noposixpaths,noacl,prefixpath=,nobrl
Options are described in more detail in the manual page
man 8 mount.cifs
To display the version number of the mount helper:
mount.cifs -V
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f341854%2ffailed-to-pass-credentials-to-nfs-mount%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Specifying username
and password
are options for cifs (samba)
, but not nfs
. According to this CentOS Documentation:
NFS controls who can mount an exported file system based on the host making the mount request, not the user that actually uses the file system. Hosts must be given explicit rights to mount the exported file system. Access control is not possible for users, other than through file and directory permissions.
I missed that! But why is 'user' a valid parameter for NFS mounts?
– TSG
Feb 1 '17 at 23:44
1
Where do you see that? There is nouser
option inman mount.nfs
.
– Timothy Martin
Feb 1 '17 at 23:51
When I try adding parameters, they all give invalid option errors, but the 'user' option does NOT generate an invalid option error
– TSG
Feb 2 '17 at 1:06
See @Adonis' answer for whyuser=
exists
– Ryan V. Bissell
Apr 20 '18 at 21:58
add a comment |
Specifying username
and password
are options for cifs (samba)
, but not nfs
. According to this CentOS Documentation:
NFS controls who can mount an exported file system based on the host making the mount request, not the user that actually uses the file system. Hosts must be given explicit rights to mount the exported file system. Access control is not possible for users, other than through file and directory permissions.
I missed that! But why is 'user' a valid parameter for NFS mounts?
– TSG
Feb 1 '17 at 23:44
1
Where do you see that? There is nouser
option inman mount.nfs
.
– Timothy Martin
Feb 1 '17 at 23:51
When I try adding parameters, they all give invalid option errors, but the 'user' option does NOT generate an invalid option error
– TSG
Feb 2 '17 at 1:06
See @Adonis' answer for whyuser=
exists
– Ryan V. Bissell
Apr 20 '18 at 21:58
add a comment |
Specifying username
and password
are options for cifs (samba)
, but not nfs
. According to this CentOS Documentation:
NFS controls who can mount an exported file system based on the host making the mount request, not the user that actually uses the file system. Hosts must be given explicit rights to mount the exported file system. Access control is not possible for users, other than through file and directory permissions.
Specifying username
and password
are options for cifs (samba)
, but not nfs
. According to this CentOS Documentation:
NFS controls who can mount an exported file system based on the host making the mount request, not the user that actually uses the file system. Hosts must be given explicit rights to mount the exported file system. Access control is not possible for users, other than through file and directory permissions.
answered Feb 1 '17 at 23:14
Timothy MartinTimothy Martin
5,2942229
5,2942229
I missed that! But why is 'user' a valid parameter for NFS mounts?
– TSG
Feb 1 '17 at 23:44
1
Where do you see that? There is nouser
option inman mount.nfs
.
– Timothy Martin
Feb 1 '17 at 23:51
When I try adding parameters, they all give invalid option errors, but the 'user' option does NOT generate an invalid option error
– TSG
Feb 2 '17 at 1:06
See @Adonis' answer for whyuser=
exists
– Ryan V. Bissell
Apr 20 '18 at 21:58
add a comment |
I missed that! But why is 'user' a valid parameter for NFS mounts?
– TSG
Feb 1 '17 at 23:44
1
Where do you see that? There is nouser
option inman mount.nfs
.
– Timothy Martin
Feb 1 '17 at 23:51
When I try adding parameters, they all give invalid option errors, but the 'user' option does NOT generate an invalid option error
– TSG
Feb 2 '17 at 1:06
See @Adonis' answer for whyuser=
exists
– Ryan V. Bissell
Apr 20 '18 at 21:58
I missed that! But why is 'user' a valid parameter for NFS mounts?
– TSG
Feb 1 '17 at 23:44
I missed that! But why is 'user' a valid parameter for NFS mounts?
– TSG
Feb 1 '17 at 23:44
1
1
Where do you see that? There is no
user
option in man mount.nfs
.– Timothy Martin
Feb 1 '17 at 23:51
Where do you see that? There is no
user
option in man mount.nfs
.– Timothy Martin
Feb 1 '17 at 23:51
When I try adding parameters, they all give invalid option errors, but the 'user' option does NOT generate an invalid option error
– TSG
Feb 2 '17 at 1:06
When I try adding parameters, they all give invalid option errors, but the 'user' option does NOT generate an invalid option error
– TSG
Feb 2 '17 at 1:06
See @Adonis' answer for why
user=
exists– Ryan V. Bissell
Apr 20 '18 at 21:58
See @Adonis' answer for why
user=
exists– Ryan V. Bissell
Apr 20 '18 at 21:58
add a comment |
The user
option is related to allow any users on your system allowed to mount the file system. See the "non-superuser mounts" of man mount
add a comment |
The user
option is related to allow any users on your system allowed to mount the file system. See the "non-superuser mounts" of man mount
add a comment |
The user
option is related to allow any users on your system allowed to mount the file system. See the "non-superuser mounts" of man mount
The user
option is related to allow any users on your system allowed to mount the file system. See the "non-superuser mounts" of man mount
answered Mar 20 '17 at 15:40
AdonisAdonis
1444
1444
add a comment |
add a comment |
sudo mount -t nfs -O user=root,pass=mypass lserver:/root /mnt/d0
Notice that the 'O' is a capital letter.
add a comment |
sudo mount -t nfs -O user=root,pass=mypass lserver:/root /mnt/d0
Notice that the 'O' is a capital letter.
add a comment |
sudo mount -t nfs -O user=root,pass=mypass lserver:/root /mnt/d0
Notice that the 'O' is a capital letter.
sudo mount -t nfs -O user=root,pass=mypass lserver:/root /mnt/d0
Notice that the 'O' is a capital letter.
answered Jan 16 at 19:51
user221488user221488
1
1
add a comment |
add a comment |
This works under CentOS
mount.cifs //192.168.0.123/myshare /mnt/myshare -o user=myuser
(it asks for the password - you can add it on the commandline probably via pass=)
Run this by itself to see all the options:
mount.cifs
Usage: mount.cifs -o
Mount the remote target, specified as a UNC name, to a local
directory.
Options:
user=
pass=
dom=
Less commonly used options:
credentials=,guest,perm,noperm,setuids,nosetuids,rw,ro,
sep=,iocharset=,suid,nosuid,exec,noexec,serverino,
mapchars,nomapchars,nolock,servernetbiosname=
directio,nounix,cifsacl,sec=,sign,fsc
Options not needed for servers supporting CIFS Unix extensions
(e.g. unneeded for mounts to most Samba versions):
uid=,gid=,dir_mode=,file_mode=,sfu
Rarely used options:
port=,rsize=,wsize=,unc=,ip=,
dev,nodev,nouser_xattr,netbiosname=,hard,soft,intr,
nointr,ignorecase,noposixpaths,noacl,prefixpath=,nobrl
Options are described in more detail in the manual page
man 8 mount.cifs
To display the version number of the mount helper:
mount.cifs -V
add a comment |
This works under CentOS
mount.cifs //192.168.0.123/myshare /mnt/myshare -o user=myuser
(it asks for the password - you can add it on the commandline probably via pass=)
Run this by itself to see all the options:
mount.cifs
Usage: mount.cifs -o
Mount the remote target, specified as a UNC name, to a local
directory.
Options:
user=
pass=
dom=
Less commonly used options:
credentials=,guest,perm,noperm,setuids,nosetuids,rw,ro,
sep=,iocharset=,suid,nosuid,exec,noexec,serverino,
mapchars,nomapchars,nolock,servernetbiosname=
directio,nounix,cifsacl,sec=,sign,fsc
Options not needed for servers supporting CIFS Unix extensions
(e.g. unneeded for mounts to most Samba versions):
uid=,gid=,dir_mode=,file_mode=,sfu
Rarely used options:
port=,rsize=,wsize=,unc=,ip=,
dev,nodev,nouser_xattr,netbiosname=,hard,soft,intr,
nointr,ignorecase,noposixpaths,noacl,prefixpath=,nobrl
Options are described in more detail in the manual page
man 8 mount.cifs
To display the version number of the mount helper:
mount.cifs -V
add a comment |
This works under CentOS
mount.cifs //192.168.0.123/myshare /mnt/myshare -o user=myuser
(it asks for the password - you can add it on the commandline probably via pass=)
Run this by itself to see all the options:
mount.cifs
Usage: mount.cifs -o
Mount the remote target, specified as a UNC name, to a local
directory.
Options:
user=
pass=
dom=
Less commonly used options:
credentials=,guest,perm,noperm,setuids,nosetuids,rw,ro,
sep=,iocharset=,suid,nosuid,exec,noexec,serverino,
mapchars,nomapchars,nolock,servernetbiosname=
directio,nounix,cifsacl,sec=,sign,fsc
Options not needed for servers supporting CIFS Unix extensions
(e.g. unneeded for mounts to most Samba versions):
uid=,gid=,dir_mode=,file_mode=,sfu
Rarely used options:
port=,rsize=,wsize=,unc=,ip=,
dev,nodev,nouser_xattr,netbiosname=,hard,soft,intr,
nointr,ignorecase,noposixpaths,noacl,prefixpath=,nobrl
Options are described in more detail in the manual page
man 8 mount.cifs
To display the version number of the mount helper:
mount.cifs -V
This works under CentOS
mount.cifs //192.168.0.123/myshare /mnt/myshare -o user=myuser
(it asks for the password - you can add it on the commandline probably via pass=)
Run this by itself to see all the options:
mount.cifs
Usage: mount.cifs -o
Mount the remote target, specified as a UNC name, to a local
directory.
Options:
user=
pass=
dom=
Less commonly used options:
credentials=,guest,perm,noperm,setuids,nosetuids,rw,ro,
sep=,iocharset=,suid,nosuid,exec,noexec,serverino,
mapchars,nomapchars,nolock,servernetbiosname=
directio,nounix,cifsacl,sec=,sign,fsc
Options not needed for servers supporting CIFS Unix extensions
(e.g. unneeded for mounts to most Samba versions):
uid=,gid=,dir_mode=,file_mode=,sfu
Rarely used options:
port=,rsize=,wsize=,unc=,ip=,
dev,nodev,nouser_xattr,netbiosname=,hard,soft,intr,
nointr,ignorecase,noposixpaths,noacl,prefixpath=,nobrl
Options are described in more detail in the manual page
man 8 mount.cifs
To display the version number of the mount helper:
mount.cifs -V
answered Jun 21 '18 at 3:55
Anon CowardAnon Coward
62
62
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f341854%2ffailed-to-pass-credentials-to-nfs-mount%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown