View previous topic :: View next topic |
Author |
Message |
mattmatteh Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 10 Mar 2004 Posts: 449 Location: near chicago
|
Posted: Sun May 02, 2004 11:39 pm Post subject: network with different uid and gid |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
R!tman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1908578499403a17853e807.gif)
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Mon May 03, 2004 8:27 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mattmatteh Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 10 Mar 2004 Posts: 449 Location: near chicago
|
Posted: Mon May 03, 2004 8:54 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mattmatteh Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 10 Mar 2004 Posts: 449 Location: near chicago
|
Posted: Mon May 03, 2004 4:38 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Chris W l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Simpsons/Simpsons_-_Ralph.jpg)
Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Mon May 03, 2004 10:49 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mattmatteh Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 10 Mar 2004 Posts: 449 Location: near chicago
|
Posted: Tue May 04, 2004 1:19 am Post subject: |
|
|
thanks. that was what i was looking for. i will test it when i get time. its finals week.
matt |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|