Re: Change of UID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/19/2013 09:39 AM, Ian Malone wrote:
> On 19 November 2013 02:05, Rick Stevens <ricks@xxxxxxxxxxxxxx> wrote:
>> On 11/18/2013 04:12 PM, Timothy Murphy issued this missive:
>>
>>> Tim wrote:
>>>
>>>>> But on re-installing the system
>>>>> (which had been in operation for several years)
>>>>> I found my UID had changed from 500 to 1000.
>>>>>
>>>>> I dealt with this by chown -R, which worked fine.
>>>>
>>>>
>>>> I've just gone through a similar change, when installing a newer release
>>>> into a LAN with mixed releases, and wanted the same usernames to have
>>>> the same UIDs and GIDs, everywhere.  It just makes things so much
>>>> easier.
>>>>
>>>> I decided to change the older release up to the newer IDs, rather than
>>>> fight against the system.  So, in my case, on the older system, I:
>>>>
>>>> edited /etc/password to change my old UID from 500 to 1000
>>>> edited /etc/group to change my old GID from 500 to 1000
>>>> chown -R tim:tim /home/tim/
>>>> chown tim:tim /var/spool/mail/tim
>>>
>>>
>>> Just a note to say that I followed this advice,
>>> and it worked perfectly.
>>> Thank you.
>>
>>
>> In the future, you could also do:
>>
>>     # find / -uid <your-old-UID> -gid <your-old-GID> -exec chown tim:tim
>> \{\} \;
>>
>> Example:
>>
>>     # find / -uid 500 -gid 500 -exec chown tim:tim \{\} \;

Alternative:  # find / -uid 500 -gid 500 -| xargs chown tim:tim

Advantage: Only 1 chown command  invocation

Kind regards

Joachim Backes



-- 

Fedora release 20 (Heisenbug)
Kernel-3.11.8-300.fc20.x86_64

Joachim Backes <joachim.backes@xxxxxxxxxxxxxx>
https://www-user.rhrk.uni-kl.de/~backes
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux