FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-15-2011, 02:14 AM
Dan
 
Default Translate user names with NFS

On Tue, Jun 14, 2011 at 7:56 PM, Dan <ganchya@gmail.com> wrote:
> Hi,
> I would like to mount a NFS share from one computer to another. The
> problem is that the usernames do not match. In NFSv3 there should be
> an option map_static to map de UIDs and GIDs but for some reason it
> does not work. It seems that I have to use the package nfs-user-server
> to use that option, but it does not exist in squeeze
> http://www.spencerstirling.com/computergeek/NFS_samba.html
>
> It should be possible to do it with NFSv4, but I need to install
> Kerberos, LDAP, etc...
>
> Is there an easy way to translate the user names of the two machines with NFS?
>
> Thanks,
> Dan
>

Hi,

I think that it should be possible to do the translation with nfs4
using /etc/idmapd.conf

This is what I tried, but it didn't work:

[General]

Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = localdomain

[Mapping]

Nobody-User = nobody
Nobody-Group = nogroup

[Translation]

Method = static
GSS-Methods = static

[Static]

user_name@localhost = user_login_name


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTimAfdr3dEgO6-PJ6ZnphjRDq98Njw@mail.gmail.com">http://lists.debian.org/BANLkTimAfdr3dEgO6-PJ6ZnphjRDq98Njw@mail.gmail.com
 
Old 06-15-2011, 03:39 PM
Camaleón
 
Default Translate user names with NFS

On Tue, 14 Jun 2011 22:14:55 -0400, Dan wrote:

> On Tue, Jun 14, 2011 at 7:56 PM, Dan <ganchya@gmail.com> wrote:

(...)

>> Is there an easy way to translate the user names of the two machines
>> with NFS?
>>
>
> I think that it should be possible to do the translation with nfs4 using
> /etc/idmapd.conf
>
> This is what I tried, but it didn't work:

(...)

Hum... have you looked at "/usr/share/doc/nfs-common/
README.Debian.nfsv4"?

At least in Lenny it says that nfsv4 is still fairly new and not fully
supported yet. But there are also some tips, like that idmapd has to be
started at both, server and client side.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.06.15.15.39.41@gmail.com">http://lists.debian.org/pan.2011.06.15.15.39.41@gmail.com
 
Old 06-15-2011, 07:17 PM
Dan
 
Default Translate user names with NFS

On Wed, Jun 15, 2011 at 11:39 AM, Camaleón <noelamac@gmail.com> wrote:
> On Tue, 14 Jun 2011 22:14:55 -0400, Dan wrote:
>
>> On Tue, Jun 14, 2011 at 7:56 PM, Dan <ganchya@gmail.com> wrote:
>
> (...)
>
>>> Is there an easy way to translate the user names of the two machines
>>> with NFS?
>>>
>>
>> I think that it should be possible to do the translation with nfs4 using
>> */etc/idmapd.conf
>>
>> This is what I tried, but it didn't work:
>
> (...)
>
> Hum... have you looked at "/usr/share/doc/nfs-common/
> README.Debian.nfsv4"?
>
> At least in Lenny it says that nfsv4 is still fairly new and not fully
> supported yet. But there are also some tips, like that idmapd has to be
> started at both, server and client side.
>

Yes idmapd has to be started on both sides. In order to do that one
has to add NEED_IDMAPD=yes to /etc/default/nfs-common (server and
client), then restart nfs-common

The nice thing about NFS4 is that it converts names to UID and GID. If
you use the original idmapd.conf it will just convert the names of
both machines. Another nice thing about NFS4 is that it does
everything in a single port (2049), so it is easier to do a ssh
tunnel.

If you have the same user (ex. pedro) with the same name but
different UID and GID NFS4 will do the conversion. Therefore I am just
going to sync the names between the two machines. To do that I guess
that I just need to change the file /etc/passwd and /etc/group Should
I update the names somewhere else?

I was hoping to have more flexibility with NFS4 without having to use
LDAP and been able to have different names, GIDs and UIDs in both
machines

This is how it looks now my idmapd.conf
[General]

Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = localdomain

[Mapping]

Nobody-User = nobody
Nobody-Group = nogroup


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTimaQfKwZKWWYqjhGhOLJicUdOd93g@mail.gmail.com ">http://lists.debian.org/BANLkTimaQfKwZKWWYqjhGhOLJicUdOd93g@mail.gmail.com
 
Old 06-15-2011, 07:57 PM
William Hopkins
 
Default Translate user names with NFS

On 06/15/11 at 03:17pm, Dan wrote:
> Another nice thing about NFS4 is that it does everything in a single port
> (2049), so it is easier to do a ssh tunnel.

Easier in the sense of less typing? You can repeat the -L and -R options as
many times as needed in a single SSH command (and can easily store them in your
.ssh/config under an alias)

--
Liam
 
Old 06-15-2011, 10:25 PM
Cam Hutchison
 
Default Translate user names with NFS

Dan <ganchya@gmail.com> writes:

>If you have the same user (ex. pedro) with the same name but
>different UID and GID NFS4 will do the conversion. Therefore I am just
>going to sync the names between the two machines. To do that I guess
>that I just need to change the file /etc/passwd and /etc/group Should
>I update the names somewhere else?

/etc/shadow and /etc/gshadow

Other specific application configs may have already recorded a username
in a config/state file somewhere.

You will probably also want to rename the home directory for the user
and update that in /etc/passwd too.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 3990.4df93151.3b925@getafix.xdna.net">http://lists.debian.org/3990.4df93151.3b925@getafix.xdna.net
 
Old 06-16-2011, 03:51 PM
Nicolas Bercher
 
Default Translate user names with NFS

On 15/06/2011 01:56, Dan wrote:

In NFSv3 there should be
an option map_static to map de UIDs and GIDs but for some reason it
does not work. It seems that I have to use the package nfs-user-server
to use that option, but it does not exist in squeeze
http://www.spencerstirling.com/computergeek/NFS_samba.html
I'm also interested in doing this between squeeze (client) and lenny (server). However I
can upgrade the server to squeeze, but then, can anyone tell us how to map usernames using
nfsv3?


Nicolas


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DFA2698.1080200@yahoo.fr">http://lists.debian.org/4DFA2698.1080200@yahoo.fr
 
Old 06-16-2011, 03:56 PM
Nicolas Bercher
 
Default Translate user names with NFS

On 15/06/2011 21:17, Dan wrote:

Therefore I am just
going to sync the names between the two machines. To do that I guess
that I just need to change the file /etc/passwd and /etc/group Should
I update the names somewhere else?
If you have data you want to keep under /home/*/ on your various machines, It'll be a pain
the re-affect the correct uid/usernames: changing users uid when you have multiple users
(uid>=1000) could result in a boring task as you first have to move users to unused uids
(say 20000, 20001, etc.) and then set them to the final uids you want to see on every
machine (1000, 1001, etc.).


Nicolas


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DFA27AB.5090602@yahoo.fr">http://lists.debian.org/4DFA27AB.5090602@yahoo.fr
 
Old 06-17-2011, 03:06 AM
Nico Kadel-Garcia
 
Default Translate user names with NFS

On Thu, Jun 16, 2011 at 11:56 AM, Nicolas Bercher <nbercher@yahoo.fr> wrote:
> On 15/06/2011 21:17, Dan wrote:
>>
>> Therefore I am just
>> going to sync the names between the two machines. To do that I guess
>> that I just need to change the file /etc/passwd and /etc/group Should
>> I update the names somewhere else?
>
> If you have data you want to keep under /home/*/ on your various machines,
> It'll be a pain the re-affect the correct uid/usernames: changing users uid
> when you have multiple users (uid>=1000) could result in a boring task as
> you first have to move users to unused uids (say 20000, 20001, etc.) and
> then set them to the final uids you want to see on every machine (1000,
> 1001, etc.).
>
> Nicolas

You should also make sure they're not loged in at the time, look for
files in /var/spool and /tmp/, etc. Tools such as ssh-agents that live
in /tmp/ will wind up with interesting uid issues, and processes that
are running and active as that user may have interesting issues as
well.

*THIS* is why it's so much more robust to set up your uid's and gid's
well in advance and consistently across a network, and keep them out
of the lower, auto-assigned ranges.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTikd+WkO2T2SWxHjFcEa2gOURkUeFg@mail.gmail.com ">http://lists.debian.org/BANLkTikd+WkO2T2SWxHjFcEa2gOURkUeFg@mail.gmail.com
 
Old 06-17-2011, 05:21 AM
Dan
 
Default Translate user names with NFS

On Thu, Jun 16, 2011 at 11:56 AM, Nicolas Bercher <nbercher@yahoo.fr> wrote:
> On 15/06/2011 21:17, Dan wrote:
>>
>> Therefore I am just
>> going to sync the names between the two machines. To do that I guess
>> that I just need to change the file /etc/passwd and /etc/group Should
>> I update the names somewhere else?
>
> If you have data you want to keep under /home/*/ on your various machines,
> It'll be a pain the re-affect the correct uid/usernames: changing users uid
> when you have multiple users (uid>=1000) could result in a boring task as
> you first have to move users to unused uids (say 20000, 20001, etc.) and
> then set them to the final uids you want to see on every machine (1000,
> 1001, etc.).
>

You need to use the option static_map. But that option is not
available in squeeze. What I understand from the post is that you have
to use the package nfs-user-server which has been removed from
squeeze.
http://packages.debian.org/lenny/nfs-user-server
http://linuxmafia.com/pub/linux/suse-linux-internals/chapter20.html

Why not using nfs4. It will automatically make the conversion. There
is no need to syncronize the GIDs and the UIDs. You have to use the
same for the users in both machines. You have to change only
/etc/passwd, group, shadow and gshadow

You can follow this:
https://help.ubuntu.com/community/SettingUpNFSHowTo

Dan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTi=f9L-FC3cRUQE0p-Q33hg1re5xhg@mail.gmail.com">http://lists.debian.org/BANLkTi=f9L-FC3cRUQE0p-Q33hg1re5xhg@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 09:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org