LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-04-2006, 03:14 PM   #16
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168

I think you're probably better of using su, or su -. With the su command you actually switch to that user before the shell starts interpreting what you type.

For example, if the /usr/local/apache2 directory has the permissions drwxr-x--- 16 apache apache and you're logged in as another user (ie not apache), then typing sudo vim /usr/local/apache2/conf/* opens a vim window with a new empty file called /usr/local/apache2/conf/*.

However, if you use su - apache (this is an example, ignore the fact that apache probably has a shell of /bin/false), typing vim /usr/local/apache2/conf/* opens the files correctly.

Which one you choose depends on what you need to do at the time. I believe there's also a gksudo and a gksu which are gtk+ front ends to sudo and su, but I haven't used them.
 
Old 03-06-2006, 01:09 AM   #17
NoStop
Member
 
Registered: Feb 2005
Location: Canada
Distribution: Debian Etch - Enlightenment E17
Posts: 116

Rep: Reputation: 15
Quote:
Originally Posted by bobbelfield
You are a classic example "Wowsers" we call them . To the others I say
"You can be quite confident that attempting to do something yourself is an absolutely safe thing to do because whatever it is some bastard will stick his nose over your shoulder and tell you how you are doing it wrong.!"
Config files for your settings are all kept on your home partition and wont have to be done again and get real why would I want to tell you if I make a mistake . I don't understand why people have a need to include such ludicrous statements
Because it would be dangerous to follow your suggestions. It is a BAD practise and shouldn't be encouraged. Everything can be accomplished by su in a terminal. Or open another session in the CLI and login as root there.

Cheers.
 
Old 03-06-2006, 01:13 AM   #18
NoStop
Member
 
Registered: Feb 2005
Location: Canada
Distribution: Debian Etch - Enlightenment E17
Posts: 116

Rep: Reputation: 15
Quote:
Originally Posted by TatforTit
Ok, but when I go to a certain folder and try to open a config file for example, when I enter the sudo command in that directory and point it towards that file, I get a prompt saying no such command or command not recognized. Is there no way to actually enter locked folders from within KDE without having to log-out and re-enter as root? I want to open a root only text file in KDE without having to actually log-in to KDE as root to begin a session. Is this possible?
Open a terminal on your desktop and at the prompt type: su
enter the root password

now you're logged in as root in that session.

cd to the directory you wish to work on a file
type in: kate <filename> to edit that file

when you've finished and saved the file and closed down kate (or whatever editor you prefer to use) .. then type: exit to leave the session as root and then type: exit to close the terminal window.

Cheers.
 
  


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
Administrator Megos Linux - Newbie 12 06-11-2007 11:55 PM
MySQL Administrator Meabert Linux - Software 6 06-08-2006 03:46 AM
Horde - How to log in as administrator? Xhalman Linux - Software 1 08-19-2005 11:48 PM
how do I log a administrator or root golpemortal Linux - Software 4 09-30-2003 10:42 AM
administrator help debdas Linux - Newbie 4 05-15-2003 04:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 09: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