FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 11-11-2011, 09:22 PM
Jonathan Ryshpan
 
Default Need to change uid and gid

In the process of upgrading from Fedora-15 to Fedora-16, my uid and gid have both been changed from 500 to 1000.* I maintain a "mirror" of my system as backup using rsync, so in order for the mirroring to continue properly the uid and gid in the mirror filesystem have to be changed to match the main one.* There's no problem with my home directory, just use "$ chown --recursive 1000.1000" in the mirror of my home directory.* However there are a few odd files, like my crontab file /var/spool/cron/jonrysh which needs to have its uid (but NOT its gid) changed.



Where is a convenient script to do this?* There must be one, since this is essentially what was done in the upgrade from Fedora-15 to Fedora-15.



Many Thanks - jon





--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-11-2011, 11:08 PM
Steven Stern
 
Default Need to change uid and gid

On 11/11/2011 04:22 PM, Jonathan Ryshpan wrote:
> In the process of upgrading from Fedora-15 to Fedora-16, my uid and gid
> have both been changed from 500 to 1000. I maintain a "mirror" of my
> system as backup using rsync, so in order for the mirroring to continue
> properly the uid and gid in the mirror filesystem have to be changed to
> match the main one. There's no problem with my home directory, just use
> "$ chown --recursive 1000.1000" in the mirror of my home directory.
> However there are a few odd files, like my crontab file
> /var/spool/cron/jonrysh which needs to have its uid (but NOT its gid)
> changed.
>
> Where is a convenient script to do this? There must be one, since this
> is essentially what was done in the upgrade from Fedora-15 to Fedora-15.

Interesting. How did you upgrade? I used preupgrade and my id stayed at 500.


--
-- Steve
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-12-2011, 02:16 AM
Jonathan Ryshpan
 
Default Need to change uid and gid

On Fri, 2011-11-11 at 18:08 -0600, Steven Stern wrote:
> On 11/11/2011 04:22 PM, Jonathan Ryshpan wrote:
> > In the process of upgrading from Fedora-15 to Fedora-16, my uid and gid
> > have both been changed from 500 to 1000. I maintain a "mirror" of my
> > system as backup using rsync, so in order for the mirroring to continue
> > properly the uid and gid in the mirror filesystem have to be changed to
> > match the main one.
> >
> > Where is a convenient script to do this? There must be one, since this
> > is essentially what was done in the upgrade from Fedora-15 to Fedora-15.
>
> Interesting. How did you upgrade? I used preupgrade and my id stayed at 500.

I installed from a DVD. In the past the DVD has always offered me the
chance to upgrade, which didn't happen this time. This didn't bother
me, since upgrades have never worked properly, so I installed fresh. My
uid's and gid's were changed automatically as part of the installation
process. Maybe I should have used preupgrade, but I was suspicious
since, as I wrote, upgrades have generally worked right.

jon



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-12-2011, 02:23 AM
g
 
Default Need to change uid and gid

On 11/12/2011 12:08 AM, Steven Stern wrote:
> On 11/11/2011 04:22 PM, Jonathan Ryshpan wrote:
>> In the process of upgrading from Fedora-15 to Fedora-16, my uid and gid
>> have both been changed from 500 to 1000. I maintain a "mirror" of my
>> system as backup using rsync, so in order for the mirroring to continue
>> properly the uid and gid in the mirror filesystem have to be changed to
>> match the main one. There's no problem with my home directory, just use
>> "$ chown --recursive 1000.1000" in the mirror of my home directory.
>> However there are a few odd files, like my crontab file
>> /var/spool/cron/jonrysh which needs to have its uid (but NOT its gid)
>> changed.
>>
>> Where is a convenient script to do this? There must be one, since this
>> is essentially what was done in the upgrade from Fedora-15 to Fedora-15.
>
> Interesting. How did you upgrade? I used preupgrade and my id stayed at 500.


you could have changed '/etc/group' and '/etc/passwd' to set your uid:gid
back to 500.

to change 'odd files', use 'find' to locate files and make changes.

find / -user 500 -exec chown 1000: ;
find / -user 500 -wholename ’/var/spool/cron/jonrysh’ -prune
-exec chown :1000 ;
or
find / -user 500 -wholename ’/var/spool/cron/jonrysh’ -prune
-exec chgrp 1000 ;

*notes*
1] due to system changing your uid:gid 'user' is now by number.
2] the "" truncates line to prevent 'line wrap'.
3] have never tried changing uid and gid separately, so i may be in
error as to exact syntax.
(if i am, i feel sure correct syntax will be posted)

therefore, read;

man find
man chown
man chgrp

info find
info chown
info chgrp


hth.
--

peace out.

tc.hago,

g
.

*please reply "plain text" only. "html text" are deleted*

****
in a free world without fences, who needs gates.
**
help microsoft stamp out piracy - give linux to a friend today.
**
to mess up a linux box, you need to work at it.
to mess up an ms windows box, you just need to *look* at it.
**
The installation instructions stated to install Windows 2000 or better.
So I installed Linux.
**
learn linux:
'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html
'The Linux Documentation Project' http://www.tldp.org/
'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge' http://howtoforge.com/
****

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-12-2011, 03:58 AM
Rick Sewill
 
Default Need to change uid and gid

On Friday, November 11, 2011 04:22:52 PM Jonathan Ryshpan wrote:
> In the process of upgrading from Fedora-15 to Fedora-16, my uid and gid
> have both been changed from 500 to 1000. I maintain a "mirror" of my
> system as backup using rsync, so in order for the mirroring to continue
> properly the uid and gid in the mirror filesystem have to be changed to
> match the main one. There's no problem with my home directory, just use
> "$ chown --recursive 1000.1000" in the mirror of my home directory.
> However there are a few odd files, like my crontab
> file /var/spool/cron/jonrysh which needs to have its uid (but NOT its
> gid) changed.
>
> Where is a convenient script to do this? There must be one, since this
> is essentially what was done in the upgrade from Fedora-15 to Fedora-15.
>
> Many Thanks - jon

I would suggest
find . -uid 500 -exec chown -h owner ;
find . -gid 500 -exec chgrp -h group ;

The -h option says do the chown or chgrp to the symbolic link
instead of following the symbolic link. Without the -h option,
the symbolic link is followed, causing the symbolic link ownership
to not be changed.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-12-2011, 04:08 AM
Rick Sewill
 
Default Need to change uid and gid

On Friday, November 11, 2011 10:58:01 PM Rick Sewill wrote:
> On Friday, November 11, 2011 04:22:52 PM Jonathan Ryshpan wrote:
> > In the process of upgrading from Fedora-15 to Fedora-16, my uid and gid
> > have both been changed from 500 to 1000. I maintain a "mirror" of my
> > system as backup using rsync, so in order for the mirroring to continue
> > properly the uid and gid in the mirror filesystem have to be changed to
> > match the main one. There's no problem with my home directory, just use
> > "$ chown --recursive 1000.1000" in the mirror of my home directory.
> > However there are a few odd files, like my crontab
> > file /var/spool/cron/jonrysh which needs to have its uid (but NOT its
> > gid) changed.
> >
> > Where is a convenient script to do this? There must be one, since this
> > is essentially what was done in the upgrade from Fedora-15 to Fedora-15.
> >
> > Many Thanks - jon
>
> I would suggest
> find . -uid 500 -exec chown -h owner ;
> find . -gid 500 -exec chgrp -h group ;
>

Oops...It's late. My syntax for the find commands is bad.
I forgot the {} to specify the file selected by the find command.
find . -uid 500 -exec chown -h owner {} ;
find . -gid 500 -exec chgrp -h group {} ;

> The -h option says do the chown or chgrp to the symbolic link
> instead of following the symbolic link. Without the -h option,
> the symbolic link is followed, causing the symbolic link ownership
> to not be changed.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-12-2011, 10:09 AM
Andras Simon
 
Default Need to change uid and gid

As someone has pointed out here a few days ago, chown has a --from
option where you can specify the current owner and group, so there's
no need to use find.

Andras
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 09:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org