LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 10-24-2004, 11:45 PM   #1
rockets
LQ Newbie
 
Registered: Oct 2004
Location: Lillian, Alabama , USA
Distribution: mepis8, debian lenny
Posts: 23

Rep: Reputation: 15
save file as root from x console?


I installed Mandrake community (10.1) and experienced slow web page loading. I modified /etc/modprobe.conf by adding two lines to the file to correct it. I had to logout and logon as root to do this. Is there a way to open a file in Kedit as user and save the file as root??
 
Old 10-24-2004, 11:58 PM   #2
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
open a Konsole....and do
Code:
su
enter your root password
now type
Code:
kedit
voila the kedit is running as root and u can do whatever you need to

linux_terror
 
Old 10-25-2004, 12:01 AM   #3
zakaluka
Member
 
Registered: Oct 2003
Posts: 58

Rep: Reputation: 15
Well, the correct (and much easier) way would be:

(1) Log into X-Windows as a regular user
(2) Open up a Konsole/xterm
(3) Become root by typing in 'su -' and your password
(4) Go to /etc (cd /etc)
(5) Run 'kedit modprobe.conf' and edit the file
(6) Close Kedit
(7) Get out of the Konsole using exit

It is very bad policy to login as root to X-Windows. It is extremely insecure and leaves you open to a lot of vulnerabilities and attacks.

Of course, you have the option of going to one of the consoles (CTRL+F1), logging in as root and editing the file from there. But, then, you'd have to use something like vim, emacs, nano, pico, ...

Regards,

zakaluka.
 
Old 10-25-2004, 12:07 AM   #4
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
thats what i just said.... minus not using kedit to cd ...
 
Old 10-25-2004, 12:24 AM   #5
rockets
LQ Newbie
 
Registered: Oct 2004
Location: Lillian, Alabama , USA
Distribution: mepis8, debian lenny
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for the help. The first reply from linux terror seems to work best. I may have other problems cause I get error messages "can't open without gui" or something like that. Then, I get error on root and then again after exit root.

This was what I was looking for tho, Thanks again

Rockets
 
Old 10-25-2004, 09:27 AM   #6
rockets
LQ Newbie
 
Registered: Oct 2004
Location: Lillian, Alabama , USA
Distribution: mepis8, debian lenny
Posts: 23

Original Poster
Rep: Reputation: 15
updated solution

You experts helped me considerabley, at least I was motivated to find the real answer:

Rt click on a clear area of the desktop

Select "run command"

Type kedit in the command box

Select options

Check run as different user

Type "root" then password

Select "file - open" then browse to the desired file

Modify your file and save

Exit

This is a clean quick method and avoids the kernel complaints when issueing gui commands from a text console, etc. ygwypf.

Don't forget to vote and vote often Nov 2 is coming soon.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
i want to a copy a file from root to a floppy on the console using slackware 10.0 salviadud Linux - Newbie 2 02-07-2005 11:32 PM
Not able to save file shadow11 Linux - Newbie 4 10-21-2004 09:15 PM
where should I save this file??? bruno buys Linux - Software 2 08-17-2004 07:54 PM
Mozilla 1.7 - No File Save / File Open dialogs on Slackware 10.0 jayseye Slackware 8 08-10-2004 06:52 AM
save as root johntramp Linux - Newbie 3 04-07-2004 05:16 AM


All times are GMT -5. The time now is 10:16 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration