1

I have set up a hadoop 1.2.1 environment on centos 6. I also use nfs-proxy that mount ndfs to local file system so that I can access the files inside hdfs locally. It works perfectly until today, I was asked to integrate user authentication with LDAP. For some reason, I have to change the uid of some existing unix user and store those new uid in LDAP.

After the change, hdfs seems not able to get the new uid of user, i.e., when I put a new file to hdfs, it still use the old uid to store the file in hdfs. I know that because when I check the uid of the new file from local mounting point of hdfs, it shows the old uid. And I can not access the file on local file system since it belongs to different user.

I have test restart the hadoop but no effect. Any suggestion?

user1817188
  • 183
  • 1
  • 8

2 Answers2

0

Unmount the one you mounted on your machine locally and restart the HDFS service.
Start mounting the ndfs to the local file system so that you can locally access the files within hdfs.

Ryan
  • 107
  • 4
0

you have to make sure you are using the LDAP user. Check with id if u are actually the LDAP user and not a local user when writing the file.

By the way you write im taking you are trying to write from a different server. If so does this machine also use the LDAP or are you using a local account? because this user will use its own uid when writing the file.

things you can check:

  • /etc/nsswitch.conf for the order in which a machine uses files or ldap for retrieving account information
  • getent passwd to check if it even know the ldap user
  • my personal experience is avoid having an ldap user and local user with the same name. This causes for all kinds of awkard issues with UIDs / home directories / etc. So if have a local users with the same username in ldap you can consider removing them from the local machine. When I migrate a server to LDAP auth I always remove the local users.