Solved

problem in UID's in mounting a partition using NFS

Posted on 2013-01-07
16
573 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

733 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