Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
network with different uid and gid
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Sun May 02, 2004 11:39 pm    Post subject: network with different uid and gid Reply with quote

i have two linux computers, one is an older redhat and the other is gentoo. the problem is that the uid and gid are different on each. when i share using smaba i get permission errors. i would like to change the old redhat system so that the uid and gui are the same as the gentoo. i think i need a script to go throught the file system and update all of them.

i will also be switching to nfs and assume that different uid will be a problem?

what i really want is the gentoo computer to mount the redhat computer when the user logs on and unmount the network when they log off without manually mounting or entering a password. at school i log on and the network drive are mounted.

matt
Back to top
View user's profile Send private message
R!tman
Veteran
Veteran


Joined: 18 Dec 2003
Posts: 1303
Location: Zurich, Switzerland

PostPosted: Mon May 03, 2004 8:27 am    Post subject: Reply with quote

You can change a users uid with
Code:
usermod -u 1111 user_1

Then user_1 has uid 1111. Be carful, in /tmp are files of which you will eventually have to change permissions for evolution, gnome, ... to work correctly again.

NFS will still have the same permission problem if you do not change uids. I think there is a way to have different uids on the two different systems using NIS, but i do not know how. Let me know if you find out.

[edit]took out 2 typos[/edit]
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Mon May 03, 2004 8:54 am    Post subject: Reply with quote

i would like to have the same uid on both system.

does usermod change just the uid or does it search the file system to update the id's of the files too?

why tmp? what about the whole file system?

and is there groupmod ?

i will read the man page next.....

thanks
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Mon May 03, 2004 4:38 pm    Post subject: Reply with quote

i read the man page and it said that it will convert the files uid in the users home directory only. i need it to convert all files in the root tree including mounted drives.

matt
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Mon May 03, 2004 10:49 pm    Post subject: Reply with quote

Something like:
Code:
# find /dir -user 1234 | xargs chown 4567
will change any file or directory under /dir belonging to UID 1234 to belong to UID 4567. Test this thoroughly on a test directory before doing it in anger against the root directory. If you also need to change the group of files you can use a slightly modified chmod in the same command. Combine this with the usermod command to change the UID for a user name from 1234 to 4567.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Tue May 04, 2004 1:19 am    Post subject: Reply with quote

thanks. that was what i was looking for. i will test it when i get time. its finals week.

matt
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum