How to recover from a stupid chown command "chown -hR userA /." ??

greetings
i am a terrible newbie of linux.
and when i am trying to chown one directory /home/someone/dX to be owned by account , say userA, i stupidly cd to /home/someone/dX and using the below command as a root:
chown -hR userA /.
I cant exlain why i did this, but the result is that nearly all the directory/files of the computer become owned by userA.
My question is , is there any way to restore all my changes caused by this command...
Last edited by samp (2008-02-28 17:42:43)

It should be possible to recover to get a working system. My son did an identical thing trying to set the mount point for his external caddy to be owned by his user. This was on SimplyMEPIS 64.
He had everything owned by jon:users, so here are excerpts from my emails (using guest user on my Mepis 32 system):
DON'T DO THIS:
I mucked up my 32 bit Mepis "su" (roughly in the same way as you?) I su'd and cd'd to / then
chown -R guest *
chown -R root *
chown -R guest /home/guest
Logging into guest I had the same problems i.e. got invalid password when su
from in a terminal or when running mepis system stuff from kmenu (uses kdesu)
DO THIS:
This should solve it:
Login in as root
run konqueror and navigate to /bin
right click on su
click the permissions tab
check the box "user: Set UID"
click on OK to close etc
You should know be able to log in as jon and use su and kdesu
his response was:
Since reseting the profile using the User Manager when I start up I get an error saying I;m not permitted to connect to the powersave daemon via DBUS, however I haven't noticed any ill-effects.
Well mostly fixed anyway.  I can still enter the password on synaptic etc. but for some reason if I am changing between sessions it wouldn't accept the password for 'jon'.  Not that this is a huge problem.
My response was
Me too. Tick the "Set UID" box for /usr/bin/kcheckpass
On my Arch linux, the following programs are UID or GID:
$ ls -l /opt/kde/bin/ | grep "sr-"
-rwsr-xr-x 1 root root      2852 2007-11-10 20:54 fileshareset
-rwsr-xr-x 1 root root     15194 2008-01-26 17:45 kcheckpass
-rwxr-sr-x 1 root nobody   56265 2008-01-26 17:46 kdesud
-rwsr-xr-x 1 root root      5876 2007-11-10 20:54 kgrantpty
-rwsr-xr-x 1 root root    567112 2007-10-14 22:28 kppp
-rwsr-xr-x 1 root root      5500 2007-11-10 20:54 start_kdeinit
Mepis has those programs in /usr/bin. "s" in the first block means "Set
UID", "s" in the second block (kdesud) means "Set GID".
The powersave problem may be due to start_kdeinit not being able to run as
root so let me know if that is fixed by the above mod.
Of course some ownerships are still wrong (nobody etc) so I guess security isn't quite up to scratch.
That was on 4th Feb and it is his main system - no problems reported back so far.
Basically, chown everything (/, recursively) to root, chown each users home recursively to that user, then deal with a few set UID & GID problems.

Similar Messages

  • How to recover from bad development of masterhead or layout or nav panel

    Hi all:
          I begin to modify framework of our portal,  but I am new to it, my question is how to recover from bad development of masterhead or layout or nav panel, there is error in my development.
    thank you very much for your reply

    Hi,
    ARe you able to access Content admin and system admin from your portal now?
    What is the error its occuring.
    Try to modify the rule collection to point to default desktop.
    Best Wishes
    Idhaya R

  • How to recover from disapled ipad

    how to recover from locked ipad after wrong passwored trile

    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup).
    If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present.
    You may have to force iPad into Recovery Mode
    http://support.apple.com/kb/ht1808

  • How to recover from renaming a drive?

    I was running Pro Tools on my G5 internal drive with OSX 10.4 . I did a CC clone of the entire drive to an external firewire drive, and then upgraded the internal drive to OSX 10.5.8. My version of PT won't run with OSX 10.5.8 so I decided to dual boot (by holding down the C key) to run PT on the external drive.
    Unfortunately, I changed the name of the external drive so I could tell it from the internal drive when dual booting. (I know, dumb move)
    Now I can't get PT to run on my external drive, and I think it's because for the drive name change. Problem is, I don't remember what the name was to change it back. Is there some log or file I can look at to tell what the drive name used to be? Or am I totally off base here, and is there another way for me to recover from my stupidity?
    Any help is greatly appreciated.
    Thanks,
    Ray

    I can't imagine that the HD name change is the cause of your problem. As far as I know, there is no log or file that would show the prior name.
    If you depress the Option key at startup which opens the Startup Manager window, does your external drive appear as a bootable choice?
     Cheers, Tom

  • How to recover from a bad upgrade due to a blackout, stuck in the recovery itunes screen on the iphone

    how to recover from a bad upgrade, due to a blackout. stuck in the recovery itunes screen on the iphone

    Bjpolinda,
    Do you have a recent iCloud or iTunes backup? If so, just plug your phone into iTunes, restore the phone and bring your backup back by following the prompts on the phone.
    If you didn't back up your phone before attempting to update, you may have lost all your photos and other data on your phone. If you restore the phone through iTunes, it will most definitely wipe your phone of all data and reset it to factory settings.
    Emmons

  • How to recover from a Sync command that returns a SyncStatus value 8 (Object not found)

    Hello,
    We are using ActiveSync protocol. We have a situation where our local DB is probably in a invalid state where we do a Sync command passing all of our folders (full sync) and one of the folder (or many) doesn't exist anymore.
    The Sync command result doesn't tell us which folder is invalid.
    But the question is more: how should we recover from this "Object not found" error? Should we erase the local database and do a full refresh?
    Status reference:
    http://msdn.microsoft.com/en-us/library/gg675457(v=exchg.80).aspx
    Thanks
    ArchieCoder

    Sorry, that really isn't a Firefox support issue. Contact a Mac support forum or Mac-users group for advice on to solve that issue.

  • How to recover from Large Volume Table Insert

    We are inserting 1 Million rows into table using ODI IKM Append. If half the way thru the job fails because of tablespace or other issue, how to recover? Does 50% rows are commited to db? What is the best way to handle this type of situation?

    You can have different options for this.. You can commit them in every 1000 rows in the KM.You can also set the dml operation into one transaction and commit the same at the end of step.
    Try to follow load plan for better restart options. If you cann't provide more undo table space then try loading less amount of records lets say 1 to 100,000 and then 100,001 to 200,000 like this which is little bit complex but you have to sacrifice something to overcome the issue.
    I believe you must have data in C$ and I$ step. Hence you process these data instead of loading again from original source. So it depends on you, how you are going to design the total process. You can better judge it. Talk with your dba about this issues as well.
    Thanks
    http://bhabaniranjan.com/

  • How to recover from a Crash

    Hi,
      I had the misfortune yesterday of having my OS X Lion operating system have a complete meltdown and become unrecoverable.  Luckily, I had a time machine backup from the previous evening, so the sequence went something like this:
    Boot with Command-R option to bring up the recovery options, selected recovery from time machine
    Wait approx 2 hours....
    All back - or is it???
    Aperture's library is not backed up by Time Machine (I'm using referenced, so the images are fine).  Luckily, I have a vault...
    Point Aperture to the Vault
    Recover recover recover.... waiting waiting....
    Finished!
    But wait!  All the images now have a red stripe icon at the bottom right.  Blast - I now have to locate referenced files.  It appears that Aperture lost the links or doesn't recognise the locations because of the complete wipe and recover from backup
    Locate referenced files, find a match, "Reconnect All".  Done.
    OH noes....  some didn't appear to reconnect.  Checking - aha!  THe vault is a couple of months old, and I did a big cull of useless images after updating the vault - the remaining unconnected images can safely be deleted from Aperture as they no longer exist.
    Now to re-do the processing of the 30 images I was working on last night...  (sigh...)
    Lessons Learned:
    1.  Make sure Time Machine is working
    2.  Update your Vault regularly onto an external hard disk

    I seem to recall that it was a recommended approach to stop huge Time Machine updates every time you touched Aperture.
    Time machine now makes incremental backups of the Aperture Library - unless the library is in use by Aperture while Time Machine is running. It suffices to quit Aperture before backing up. That is what I do on my MBP.
    Something else to note for the record:  when you do a recovery and reinstall from Time Machine, Aperture perceives your reconstructed boot volume as a new volume, even though it has the same name and everything.
    Exactly, but thankfully reconnecting is easy.
    To restore a system I usually restore from a bootable clone. I regularly clone the system as a secondary backup.
    Cheers
    Léonie

  • How to recover from Oracle XA Error Native Error 24776?

    Hello,
    I believe that I have a connection leak somewhere and that an Oracle
    connection is hung.
    I get the following error when trying to access the data source
    getConnection method.
    How can I recover from this? The WL Server console shows 0 connections
    to the connection pool, but obviously some are in there.
    Thanks,
    java.sql.SQLException: XA error: XAER_RMERR : A resource manager error
    has occur
    ed in the transaction branch start() failed on resource 'Oracle Connection
    Pool': XAER_RMERR : A resource manager error has occured in the
    transaction bra
    nch
    javax.transaction.xa.XAException: [BEA][Oracle JDBC Driver]Oracle XA
    Error Occur
    red. Native Error: 24776
    at
    weblogic.jdbcx.oracle.OracleImplXAResource.checkError(Unknown Source)
    at weblogic.jdbcx.oracle.OracleImplXAResource.start(Unknown Source)
    at weblogic.jdbcx.base.BaseXAResource.start(Unknown Source)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
    at
    weblogic.transaction.internal.XAServerResourceInfo.start(XAServerReso
    urceInfo.java:1075)
    at
    weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerRe
    sourceInfo.java:1007)
    at
    weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerRes
    ourceInfo.java:203)
    at
    weblogic.transaction.internal.ServerTransactionImpl.enlistResource(Se
    rverTransactionImpl.java:419)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
    at
    weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1
    250)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
    at
    weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:305)

    Steven ,
    It's already been answered:
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&threadm=4009ccc9%241%40newsgroups.bea.com&rnum=1&prev=/groups%3Fq%3D24776%2520OracleImplXAResource%26hl%3Den%26lr%3D%26ie%3DUTF-8%26c2coff%3D1%26sa%3DN%26tab%3Dwg
    Regards,
    Slava Imeshev
    "Steven Ostrowski" <[email protected]> wrote in message news:40ce1480$1@mktnews1...
    Hello,
    I believe that I have a connection leak somewhere and that an Oracle
    connection is hung.
    I get the following error when trying to access the data source
    getConnection method.
    How can I recover from this? The WL Server console shows 0 connections
    to the connection pool, but obviously some are in there.
    Thanks,
    java.sql.SQLException: XA error: XAER_RMERR : A resource manager error
    has occur
    ed in the transaction branch start() failed on resource 'Oracle Connection
    Pool': XAER_RMERR : A resource manager error has occured in the
    transaction bra
    nch
    javax.transaction.xa.XAException: [BEA][Oracle JDBC Driver]Oracle XA
    Error Occur
    red. Native Error: 24776
    at
    weblogic.jdbcx.oracle.OracleImplXAResource.checkError(Unknown Source)
    at weblogic.jdbcx.oracle.OracleImplXAResource.start(Unknown Source)
    at weblogic.jdbcx.base.BaseXAResource.start(Unknown Source)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
    at
    weblogic.transaction.internal.XAServerResourceInfo.start(XAServerReso
    urceInfo.java:1075)
    at
    weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerRe
    sourceInfo.java:1007)
    at
    weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerRes
    ourceInfo.java:203)
    at
    weblogic.transaction.internal.ServerTransactionImpl.enlistResource(Se
    rverTransactionImpl.java:419)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
    at
    weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1
    250)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
    at
    weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:305)
    [att1.html]

  • How to Recover from last failed execution by using exported scripts

    I have exported a Data Services batch job to  unix scripts of job_batch.sh. The Enable Recovery option is selected when the job was exported. After I run the scripts (./job_batch.sh) and the job failed, I only can rerun it again using Recover-from-last-failed-execution option at Management Console.
    Is it a way to rerun the job from last failed execution again from the scripts itself, not going through Management Console? Or have to rerun the scripts with any unix option to enable it to run from failed stage?
    Thank you

    In our world a recovery is done manually, hence no automatism there. In fact, there is some code that checks if the last run was unsuccessful and only in that case the Management Consol allows to add the "recover from last failed execution point".
    Having said that, adding the command line property -Cr manually always, does work as Manoy explained.

  • How to recover from RTSA71-55P6AU-XD003G-60UM03

    Hello -
    How do I recover from this 'Start Up' error:
    RTSA71-55P6AU-XD003G-60UM03
    When starting up normally or in Safe Mode, it stops frozen and hangs until a hard shutdown is implemented. 
    In safe mode start-up, the process stops at 'atipcie.sys'. 
    Any ideas? 
    - Dub
    Compaq Presario CQ62-220US Notebook
    This question was solved.
    View Solution.

    Hi,
    For software damages, we may be able to recover data but for hardware damages, sometimes very hard to recover data and many times we can't recover at all.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to recover from datasource.getConnection hangover

    Hi,
    We have a standalone J2EE application wherein the app tries to restart itself in case of FATAL errors like connection loss etc.
    Database: Oracle10g
    Driver: oracle.jdbc.driver.OracleDriver
    Issue: On error, the service tries to restart itself dueing which it aborts the connection and recreates the connection with datasource.getConnection().
    In some cases during Soak testing, if the database goes down then the application seems to hang on datasource.getConnection() for almost 3 hours and greater.
    Options we tried :
    1. Use OracleDataSource and setLoginTimeout as 10 secs.
    There seems to be no effect on the code. Not sure whether the datasource actually uses the timeout interval.
    2. Use CONNECT_TIMEOUT_LISTENER=10 in listener.ora on the database server.
    Does not seem to resolve the issue. getConnection still hangs.
    Any suggestions what would be the best way to recover from this issue?

    Hi,
    The same should be available in the source system (DEV), Surprising how / why the same is available in BW system.
    I checked the SAP ERP source system to which I have an access and the same is not available in the source system not in the BW system
    My sugession is to go for a generic datasource after identifying the table with the help of functional consultant.
    Regards
    Venkata Devaraj

  • How to recover from network port configuration deletion (airport)

    a couple of years ago, i accidently deleted the network port configuration for AirPort in the Show pop-up menu. No big deal, i thought at the time. I don't have an AirPort card and I won't be using AirPort in this computer. Ok, I now have an old-style AirPort card (powerbook G3 firewire, 10.2.8) and the AirPort utility doesn't see that it's installed. I realized right away, the network doesn't have a port... so the system doesn't see it, right? So, how do I get this port back? Do I have to reload a new System entirely and not save previous network settings... or is there an easier way to recover from my blunder?

    Thanks Rob,
    Glad to be here. Yeah, 10.2 works the same as 10.4. The problem with what you suggest is that I can no longer get airport as an option in Network port configs... so when I go to the new button all the other options are there EXCEPT AirPort. This is what I need to restore. I haven't checked, but I'm assuming I've nuked the pref panel out of the master library. So, I've messed up big time. I was looking for a way to recover that didn't involve reloading the whole system. This isn't like OS 9 and older where you can go and pick a little piece and stick it back into your system folder... I think. Thanks for the reply.

  • HT1212 how to recover from passcode lock

    Please help to recover from lock out device disabled after wrong passcode enterred There seems to be not backup avaiable on home PC.

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    Also, see iTunes- Restoring iOS software.

  • How to recover from error message 13014

    I am having a problem with launching the itunes from my computer. I consistantly receive the error message 13014 with every attempt. Is there some way I can recover from this error short of wiping the computer clean?

    Repair Permission with Disk Utility.  See if it starts.
    If not, relocate Genius related files in your iTunes Library folder to another folder somewhere.  Test if it starts.

Maybe you are looking for

  • How can i capture sales order items in C# and pass them to a BAPI?

    Hi everybody, here is another novice question for you. What control should i use in Visual Studio to allow the user to enter sales order items (material and qty) as a table on the screen and then put these items on a table and call the BAPI to create

  • Is it possible to move songs from ipod to itunes?

    i just bought a new macbook and proceeded to consolidate my files on itunes on my old pc. i then put that folder on an external drive which i plugged into my mac. unfortunately, it didn't seem to accept the .tmp files or the .xml file. once i plugged

  • How to handle leap in exit variable

    Hello Experts, I have a Customer exit variable which displays data for previous year of input date. When i am entering 02/28/2005 as input then the variable displays data only till 02/28/2004 but 2004 is a leap year and it has 29 days so my 29th day

  • Account's holder name

    Hi All, I am working with outbound idocs, requirement is to update the bank data in segement e1edk28. Currently system does not show the correct details for the bank in segement e1edk28. I have found one user exit in which I have created the logic in

  • Airtunes with Airport Express Base Station stopped working for no reason

    Hello, I used to play music through AirTunes with no problem. I have an Airport Express Base Station and I'm connected to it with an Airport Extreme Card built-in my iBook G4. When I came home after day at work (with the iBook, which is connected in