?
Solved

problem in UID's in mounting a partition using NFS

Posted on 2013-01-07
16
Medium Priority
?
576 Views
Last Modified: 2013-01-24
Hello All,

I have one nfs share need to mount on a client with same uid and user - is it possible ..because on client there is already a user with same UID with diff name.
0
Comment
Question by:apunkabollywood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
16 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38750501
Yes, that's possible, because names are irrelevant here.

You should be aware that the share's files/dirs will appear on the client machine as being owned by the user as named on that client, but will still appear on the server as being owned by the user as named on the server.

Running an "ls -ln [...]" against the share will exhibit the files/dirs as being owned by the same UID on both sides, however.
0
 

Author Comment

by:apunkabollywood
ID: 38750615
Okay let me explain:

DIR A is in Server and owned by UserA:Sysgroup   (UID 2001)

When mounted on Client

DIR owned by nobody:sysgroup

Note: On client there is no UserA but yes UserB is there with same UID 2001

Hope it helps u to understande and pls advice how to reoslve it- as i dont want to touch USERB but need same UID to show as its a need of application
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38750626
This is implausible.

If there is a user B on the client with UID 2001 then DIR owned by UID 2001 on the server will show up as owned by user B and not by "nobody" on the client.

Please recheck: What do you see with "ls -ln DIR" on server and client?

Which NFS versions (3/4) are in use?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:apunkabollywood
ID: 38750740
On Client

nfs-utils-1.2.3-15.el6.x86_64

ln -ln dir gives

99:200
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38750776
So DIR is owned by UID 99 and not by UID 2001.

Is UID 99 also available on both sides?

And with NFS version I meant to ask for the protocol version, not the software version.

By the way, a possible scenario where an exported share can show up as being owned by "nobody" is when the share has been exported using the option "all_squash".
0
 

Author Comment

by:apunkabollywood
ID: 38750820
yes but on server its owned by 2001 only  and it shared as (rw,sync) only now i want 2001 on client also ...99 is nobody and available on both but we need 2001 UID to be the owner on clinet
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38750841
>> shared as (rw,sync) only  <<

Do you see the above with "mount" on the client or by examining /etc/exports on the server?

"all_squash" along with several other options does not show up with "mount".

Could it be that your users are defined via NIS?

In this case you must add to or change in  /etc/idmapd.conf on the client:

[Translation]
Method = nsswitch

(NFS V4 only)
0
 

Author Comment

by:apunkabollywood
ID: 38750864
Yes on server /etc/exports - Folder shared as (rw,sync)only

No users are not defined as NIS and no change also done for any particular user in NFS also.

Still you want me to make changes in /etc/idmapd.conf ...and what service need to be restart or change after that?

Client File below(Its RHEL 6.2):

[Mapping]

Nobody-User = nobody
Nobody-Group = nobody

[Translation]

# Translation Method is an comma-separated, ordered list of
# translation methods that can be used.  Distributed methods
# include "nsswitch", "umich_ldap", and "static".  Each method
# is a dynamically loadable plugin library.
# New methods may be defined and inserted in the list.
# The default is "nsswitch".
Method = nsswitch

# Optional.  This is a comma-separated, ordered list of
# translation methods to be used for translating GSS
# authenticated names to ids.
# If this option is omitted, the same methods as those
# specified in "Method" are used.
#GSS-Methods = <alternate method list for translating GSS names>
 
#-------------------------------------------------------------------#
# The following are used only for the "static" Translation Method.
#-------------------------------------------------------------------#
#[Static]

# A "static" list of GSS-Authenticated names to
# local user name mappings
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38750878
idmapd.conf looks OK so far.

What's in its "[General]" section under  "Domain="? Should be your local domain name.

Restart rpc.idmapd on client (and server, who knows?) after making changes.

Is this daemon running at all?
0
 

Author Comment

by:apunkabollywood
ID: 38753713
# The default is the host's DNS domain name.
#Domain = local.domain.edu

restarting rpcidmapd will it effect other services?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38753768
No, not as far as I know. But I think you should umount the share (if possible), then restart idmapd, then mount the share again.
0
 

Author Comment

by:apunkabollywood
ID: 38785530
sorry for delay in response hard luck still same problem :(
0
 

Author Comment

by:apunkabollywood
ID: 38795484
I have tried same u adviced ... On server restart service rpcidmapd
than on client umount the point than restart rpcidmapd service than again mount but still same proble nobody is picking
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 38798917
In fact I suggested changing /etc/idmapd.conf and restarting idmapd  on the client!

The change I meant to suggest was removing the comment (#) sign in front of "Domain" and adding the actual name of the client's local domain in the client's /etc/idmapd.conf, like (just examples!)

Domain = my.domain.com

or

Domain = apunkabollywood.com

Umount the share before restarting idmapd on client and server, mount it again afterwards.
0
 
LVL 19

Expert Comment

by:simon3270
ID: 38799061
If you don't want to touch UserB, you could change the UID of UserA on the server, and create a UserA with the same new UID on the client.
0
 

Author Closing Comment

by:apunkabollywood
ID: 38815195
Many Thanks
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question