LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Admin access to primary hard drive OS via Live CD (https://www.linuxquestions.org/questions/linux-desktop-74/admin-access-to-primary-hard-drive-os-via-live-cd-880470/)

r00ster 05-13-2011 03:01 AM

Admin access to primary hard drive OS via Live CD
 
I'm using a Knoppix Live CD (Debian 4.1.1-19) to access a corrupted file on my Hard Drive.
In order to alt-edit the file, I need root privileges.

What is the regime for invoking the root/Admin password prompt for the install on my primary HD? I've tried the usual "kdesu" & "startx" in terminal with the HD partition(s) mounted. But that's either the wrong approach or I'm using the commands incorrectly.

My HD is running Deb/GNU 2.6.18-5-686, KDE 3.5.5

rooster

ButterflyMelissa 05-13-2011 05:01 AM

Hi,

Similar issue, different solve: I use a Fedora Live CD, when booted you're root. Well, you may have to click on, though.

I tried an edit, the Live System said something like "tsk-tsk I'll report this to the Root" - but it let be do my thing. No need for a root pass...

Never used Knoppix/DSL for that, as I could'nt mount the hard drive. Of course, I did'nt have the most recent versions ;)

In your case, i'd try a Fedora Live CD...

Good luck with the repairs!

Thor
Edit:
Quote:

What is the regime for invoking the root/Admin password prompt for the install on my primary HD?
The booted system asks the password, not the hard drive. On a Live CD, the booted system is ... a Root system.

r00ster 05-13-2011 07:40 PM

Quote:

Mention what your goal is....
Thor;

I did my best to make my objective clear.

I'm using a live CD to mount my primary Hard Drive that has corrupted files on it that I need to edit in order to boot my primary OS located on that drive.

The files on my primary OS are password protected; i.e., I need to invoke root privileges in order to alt-edit them or move them;..anything.

So the question is, how does the password prompt for my primary OS get invoked 'remotely' from a live CD?

I assume this is do-able; else how could files be redeemed from a faulty HD using a live CD; which regime is a well documented procedure for techy-types when important documents need to be preserved.

rooster

ButterflyMelissa 05-14-2011 02:28 AM

Quote:

I did my best to make my objective clear.
Umm, of course you did...the question (from my signature) to "mention what the goal is" goes for those that come with a question of about one line and three dots, and give no specs, these questions are harder to answer. You did provide specs...so that's cool... ;)

Quote:

I assume this is do-able;
Perfectly...have you tried to fire up a system editor from the Live CD? Okay, the way I rescue systems is as follows: I take a Live CD and boot from that. Once booted into the desktop, I open the gedit, or whatever the CD comes with, after mounting the internal drive. To mount, I open the file browser, click on the icon provided and ... voila. Yes, the Live System will ask for a password, but that is a dummy, just click through and you're in. I can access the complete drive that way, though the OS on the hard drive is not booted...of course, that OS would have demanded the proper password.

Hope this helps!

I'll be monitoring this to see where we end up!

Thor

Edit : if you do have the nerve to go "hard core" - I'd suggest tty linux. Boot from the CD, log in with "root" and "password" (as mentioned at boot) and you're greeted with a dry "chop wood, carry water" (still dont understand the meaning of this...) and dive right in:

Find out the name(s) of the stuff in the system

Quote:

fdisk -l
mount the drive

Quote:

mount /dev/hda1 /mnt/c:
for example (replace the hda1 with your info...but you know this)

navigate to the drive

Quote:

cd /mnt/c:
from there make your way to the "patient"

Quote:

cd path/to/the/patient.ext
(careful, I'd not use a slash in front of the path)

and...operate

Quote:

vi patient.ext
Just tested it, and that works for sure! You'll have to use vi, though...

Lemme know where you end up! ;)

r00ster 05-16-2011 04:36 AM

Thor;
Quote:

Perfectly...have you tried to fire up a system editor from the Live CD? Okay, the way I rescue systems is as follows: I take a Live CD and boot from that. Once booted into the [?Live CD?] desktop, I open the gedit, or whatever the CD comes with, after mounting the internal drive... <snip>
Isn't that a little like giving a tourist directions by saying; "Y'all turn left about a mile before you get to the house where Delbert used to live."?


Quote:

To mount, I open the file browser, click on the icon provided and ... voila. Yes, the Live System will ask for a password, but that is a dummy, just click through and you're in.
That appears to be about the same as using Live CD Konsole to issue:
Code:

knoppix@Knoppix:~$ mount /dev/hda[X]
knoppix@Knoppix:~$ su
root@Knoppix cd /mnt/hda[X]/[user name] [folder name]

As you've indicated, that gives access to whatever directory/file is needed on the Primary HD in the [X] partition by simply using the Live CD (Konqueror) file manager/browser. But, for files on that partition that need Admin privileges for editing & etc., there remains the need to invoke the Admin's password as per the Primary OS. You seem to confirm this from the following sentence:
Quote:

I can access the complete drive that way, though the OS on the hard drive is not booted...of course, that OS would have demanded the proper password.
... but that is the point of my query. Unless I'm missing the obvious, if I can't copy the pw protected file even though I have located it, then using an editor (in this case I have KWrite, Kate, NEdit or Nano) is unfeasibe.

In the simplest terms I can muster; if I can't edit a file 'in situ', and I can't copy it to another location (e.g., a text editor) without gaining root access by invoking the Primary OS password prompt, then I'm no further ahead at this point; ...eh?

It could just be that I haven't made it clear that I don't know how to get xterm, or a shell or Konqueror to run in my primary OS from the live CD. If I could, then perhaps I could get to the pw prompt.

r00ster

TobiSGD 05-16-2011 05:29 AM

I think there is a misunderstanding here. If you use su in the terminal of the Live-CD to become root, you automatically are root in the installed OS. Please show us the commands you use to copy the files you want, and what error messages you get. This will show us what really goes on and helps us a lot more than a simple "can't copy".

ButterflyMelissa 05-16-2011 08:59 AM

Quote:

I think there is a misunderstanding here. If you use su in the terminal of the Live-CD to become root, you automatically are root in the installed OS
In one clean sentence what I was on about, of course, this is something so day-to-day to me (and the rest of us) that I may have forgotten how to explain the concept (sorry)...but as TobiSGD pointed out: once booted in a Live CD (or TTYLinux for that matter) you are Root of the whole system, including insttalled drives...


All times are GMT -5. The time now is 02:56 PM.