LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I erased /home/root and now can not administer the system (https://www.linuxquestions.org/questions/linux-newbie-8/i-erased-home-root-and-now-can-not-administer-the-system-781312/)

tfallon 01-10-2010 03:00 PM

I erased /home/root and now can not administer the system
 
I am operating Debian 5.0 kernel 2.26. In trying to clean up (I believe I was using a root terminal), I erased the directory /home/root. Since I have done that, I can not get to a root terminal, can not use synapse and a host of other administrative processed.

Now, when I boot the system, I can log in as a user (my version of Debian does not allow me to login as the administrator). Then, logged in as the user, I previously could select for example 'synapse', I would be given a screen to enter the Administrator password and then get synapse. Now, I am given the screen to enter the Administrator password, but once I enter it, I do not get synapse. I do get an error message
'can not find /home/root/.synapse'
And of course, I erased the /home/root directory.
Now I might just mkdir /home/root - except to do that I need a root terminal and I can not get that either - probably for the same reason.

I have tried using the boot disk and going to the rescue mode - except for some reason I can not mount a root directory. I believe it is because I am using LVM2 and my root directory must be in an LVM volume, but I can not figure out how to get to that using the rescue mode.
Can you help me?

Elemecca 01-10-2010 03:09 PM

You should be able to su up from a normal user shell. Open a terminal as any user and run "su". It'll should ask you for the root password and then give you a root shell. If the root password isn't defined, use "sudo -s" instead. It will as for your password, not root's. Once you have a root shell, execute the following commands.
Code:

cp -r /etc/skel /home/root
chown -R root:root /home/root


ozanbaba 01-10-2010 03:10 PM

did you try using su for going root? it should work without home dir.

after that recreae root home dir mkdir /home/root

tfallon 01-10-2010 03:41 PM

Thanks,
Worked like a charm. simple. I guess I need to learn more command line commands.

ozanbaba 01-10-2010 03:43 PM

Quote:

Originally Posted by tfallon (Post 3821667)
Thanks,
Worked like a charm. simple. I guess I need to learn more command line commands.

some very useful commands: su, sudo, ls, grep, cat, less, vi, man, lynx (or links for web).

you can do a lot of work with them or learn how to do it.


All times are GMT -5. The time now is 02:52 AM.