Need to change guids and uids

Mark Phillips mark at phillipsmarketing.biz
Fri Jan 27 18:32:05 MST 2006


Well, some surprises, but it worked

1. Having the user log out removed all the /proc files....doh!

2. usermod changes the uid in all the files in /home/user automatically. It 
does not touch any files outside of /home/user.

3. groupmod does not change the guid in /etc/passwd. I had to do that 
manually. It only changes /etc/group as far as I can see.

4. I went ahead and used the find / .... -exec chown.... commands because I 
had to change the guid manually in /etc/passwd

Now, my NFS is working as it should between all three machines. And I can ssh 
into softball. All is right with the world (or at least my little lan)

Thanks, PLUGERS!!

On Friday 27 January 2006 05:52 pm, Michael Garfias wrote:
> You've pretty much got it.
> 
> don't touch /proc.
> 
> Have the users your changing logged out when you make the changes.
> 
> Otherwise it looks good.  Though I usually just edit /etc/passwd|
> group by hand.
> 
> On Jan 27, 2006, at 5:40 PM, Mark Phillips wrote:
> 
> > I have three Debian sarge machines on a network. Two servers
> > (softball and
> > gandalf) have kernel 2.6 and the laptop (latitude610) has kernel
> > 2.4. I wanted
> > to share some file space from the two servers, so I installed NFS
> > and BAM hit
> > the wall.
> >
> > I have no problems reading/writing from latitude610 to gandalf, but
> > I can only
> > read files on softball from latitude610.
> >
> > I believe that the reason is that the uid/guids for user mark are
> > the same on
> > gandalf and latitude601 (1000:1000), but different on softball
> > (1001:1001).
> > Can this be the reason?
> >
> > The plot thickens because there is already a user (emily) on
> > softball with a
> > guid/uid of 1000:1000.
> >
> > After some poking around, I came up with this possible solution:
> >
> > # On softball - change emily's uid/guid and files
> > usermod -u 1010 emily
> > groupmod -g 1010 emily
> >
> > # Change all files owned by emily to the new emily
> > find / -uid 1000 -exec chown -v emily:emily {} \;
> >
> > # On softball - change mark's uid/guid and files
> > usermod -u 1000 mark
> > groupmod -g 1000 mark
> >
> > # Change all the files owned by mark to the new mark
> > find / -uid 1001 -exec chown -v mark:mark {} \;
> >
> > Will this work?
> >
> > Also, when I do a find / -uid 1000 on softball, I get a lot of /
> > proc/xxxxx
> > hits. Do I need to change these as well, or will they go away when
> > I reboot?
> >
> > Should I make these changes after booting softball in single user
> > mode?
> >
> > Is there a better way to solve this problem? Samba? Quit and just
> > drink beer?
> >
> > Thanks!
> >
> > --
> > Mark Phillips
> > Phillips Marketing, Inc
> > mark at phillipsmarketing.biz
> > 602 524-0376
> > 480 945-9197 fax
> > ---------------------------------------------------
> > PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> > To subscribe, unsubscribe, or to change  you mail settings:
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> 
> 

-- 
Mark Phillips
Phillips Marketing, Inc
mark at phillipsmarketing.biz
602 524-0376
480 945-9197 fax


More information about the PLUG-discuss mailing list