[SATLUG] Root problems

Channing Channing.ML at channingc.com
Sat Aug 7 15:22:37 CDT 2010


  On 8/7/2010 9:35 AM, Daniel Givens wrote:
> On Aug 6, 2010, at 6:40 PM, Peter Cross wrote:
>
>> I am using Fedora 12 and cannot it seems get to root:
>>
>> [Peter at heretic ~]$ su -c "nano /etc/pam.d/gdm"
>> Password:
>> su: cannot set groups: Operation not permitted
>>
>> I've tried to just a normal "su -" to get to root as well and the same issue
>> appears. I was using chmod the other night and I think I may have
>> inadvertently done a "chmod -R 777 /" (intended to do a "chmod -R 777
>> /var/hda/files" my yellow lab hit my hand, he wanted attention :) ). Is this
>> recoverable or in the grand scheme of things is it better to just reinstall?
>> I have a very recent backup but would not like to have to reinstall, migrate
>> the data back, and get all of my other applications reset (6+ hours).
>>
>> Thoughts? Recommendations? Prayers?
> rpm does have an option to reset the permissions back to their stock state.
>
> rpm --setperms {packagename}
>
> That said, you would have to run that for every package installed. I'll setup a test VM to see if I can figure out an easy way to get the output from 'rpm -qa' to a list that would be usable by the command above.
>
> As for getting around not being able to su to root, you can get around that by either booting into single user mode or by booting to a recovery environment and chroot'ing into your system environment.--
> _______________________________________________
> SATLUG mailing list
> SATLUG at satlug.org
> http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
> Powered by Rackspace (www.rackspace.com)
That's a good idea Daniel. Here is the code Peter...

for pkg in $(rpm -qa --queryformat '%{NAME}\n')
{
rpm --setperms ${pkg}
}

Good Luck!



More information about the SATLUG mailing list