Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mounting nfs with specific user id
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Conzar
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 89

PostPosted: Mon Jun 13, 2005 7:14 pm    Post subject: mounting nfs with specific user id Reply with quote

Is there anyway to mount a nfs partition with a specific userid and password?
If not, then can you use a local userid (for the client) and use NIS for just the NFS mounts?

Thanks
Back to top
View user's profile Send private message
alechiko
Guru
Guru


Joined: 01 Feb 2004
Posts: 465
Location: Inside piano, do not disturb.

PostPosted: Mon Jun 13, 2005 7:32 pm    Post subject: Reply with quote

I mount a networked storage device with these parameters in my /etc/fstab

Code:
//Linkstation/share     /mnt/linkstation smbfs           password=root,user,rw,auto,noatime,umask=000,nls=utf8  0 0


Not sure if that helps?
_________________
None
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Mon Jun 13, 2005 7:35 pm    Post subject: Reply with quote

If you mean mounting an NFS share and chowing the files to uid=xxx and gid=yyy then yes, you can.

man exports will explain it much better than me.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
Conzar
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 89

PostPosted: Mon Jun 13, 2005 7:40 pm    Post subject: Reply with quote

Sort of ---- basically there is a server with a user account that has specific permissions on the nfs. I have another machine with a different user id. What I want to do is to be able to mount the nfs partition with my local account but be able to have the permissions of my "network" account.

I was told that I can force both my local user id and my networked user id to match by chaning it in the password file (either on the server or local box). What do you think of this solution? Is there a better way of doing it?
Back to top
View user's profile Send private message
Conzar
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 89

PostPosted: Mon Jun 13, 2005 8:20 pm    Post subject: Reply with quote

It looks like the samba stuff you posted should work; however, is there another way to provided the password so its not clear text?
Back to top
View user's profile Send private message
Conzar
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 89

PostPosted: Tue Jun 14, 2005 12:42 pm    Post subject: Reply with quote

OK, I tried using samba and this is the error that I am getting.

sudo mount -t smbfs -o username=xxxx,password=xxxx //x.x.x.x:/shared /mnt/shared
Password:
27289: Connection to 192.168.2.126: failed

any thoughts?
Back to top
View user's profile Send private message
Conzar
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 89

PostPosted: Tue Jun 14, 2005 6:11 pm    Post subject: Reply with quote

OK, I've got it all worked out.

The syntax for nfs is differnt then smba so its //server_name/shared_dir

so in the fstab file you can do this
//server_name/shared /mnt/shared smbfs username=xxx,rw,defaults,... 0 0

If you don't include a password, then when you go to mount it, the server will ask.

Also, having sudo is very helpfull so you don't have to switch to root to mount it.

Thanks for the help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum