Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
Last edited by r00ster; 05-13-2011 at 07:49 PM.
Reason: clarification
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!
Last edited by ButterflyMelissa; 05-14-2011 at 03:05 AM.
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.
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".
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.