Solved

problem in UID's in mounting a partition using NFS

Posted on 2013-01-07
16
572 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
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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 500 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

785 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