LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-10-2010, 03:00 PM   #1
tfallon
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Rep: Reputation: 0
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?
 
Old 01-10-2010, 03:09 PM   #2
Elemecca
Member
 
Registered: Nov 2008
Location: San Francisco, CA
Distribution: Gentoo, CentOS
Posts: 71

Rep: Reputation: 22
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
 
1 members found this post helpful.
Old 01-10-2010, 03:10 PM   #3
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

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

after that recreae root home dir mkdir /home/root
 
1 members found this post helpful.
Old 01-10-2010, 03:41 PM   #4
tfallon
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks,
Worked like a charm. simple. I guess I need to learn more command line commands.
 
Old 01-10-2010, 03:43 PM   #5
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by tfallon View Post
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the difference between real root system and normal root system zameer_india Linux - Newbie 17 07-04-2012 12:18 PM
yum-complete-transaction erased my system. bubnoff Red Hat 7 09-22-2009 07:28 PM
Help me build a great home 64-bit home Linux system walterbyrd Linux - Hardware 14 01-10-2009 08:33 PM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration