Solved

problem in UID's in mounting a partition using NFS

Posted on 2013-01-07
16
570 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
 

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

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now