Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User IDs, User Names on mounted filesystems

Status
Not open for further replies.

teklid

Programmer
Jul 10, 2003
8
NL
This is my problem:

I am using the same user login ID on two development AIX servers. Both servers have filesystems mounted on each other and I am getting a mix match of User ID and names when I view the files in the mounted directories. This causes a big permission problem when checking files in/out SCCS.

e.g 1st server:
uid=431(jsmith) gid=515(ontw) groups=1(staff)

I've edited the following file using SCCS and the date,time,user and permission is stamped correctly.

-rw-r--r-- 1 jsmith sys mubzent.4gl

Now I go to my 2nd server, also logged in as jsmith:
uid=376(jsmith) gid=200(informix)

-rw-r--r-- 1 431 sys mubzent.4gl

Now it appears that the owner of the file is 431 and not jsmith.

Any ideas how I can get around this problem?

 
This is a fairly typical problem. The permissions are based on the UID and not the user name. Since the first system has a UID of 431 for jsmith and the UID on the second system is 376, they don't match. Simply change the UID for jsmith to 431 on the second system and they will match, but you will have to do some chown's to get things all squared away.

When creating new ID's specify the UID the same on both systems, or use something like the new LDAP server for authentication which keeps one copy of all this info.
 
Thanx jwtesch. I shall try this out immediately. Will this still cause a problem when checking files back into SCCS as the user name not the userid is in the SCCS p-file?

I've written a shell script to get around this problem by changing the user name in the p-file to that of root and logging everything back into SCCS as root user. I know that this is not the best solution but I don't know any other way of approaching this problem.

Your help is much appreciated!!
 
think of the userid as just a handle, the UID (number) is what is important. however it is only important to AIX, for the most part everyone else uses the userid (name), but of course that will depend on the whims of the app programmer.

there is a nice option to "find" which returns files that match a particular user, and if you specify a number it assumes a UID, so once you change the UID in your /etc/passwd to 431, you can do something like:

find / -user 376 | xargs -n 1 chown jsmith

i may have a syntax error, please read your man pages.

IBM Certified -- AIX 4.3 Obfuscation
 
Thanks Yegolev,

This works perfectly. Thanks again for your help!

Teklid.
 
when doing the find command you should do a

find / ! -type l -user 376 in order to avoid links since changing the owner of links will change the ownership of the underlying file rather than the link itself

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top