LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-30-2004, 06:53 AM   #1
cheech66
LQ Newbie
 
Registered: May 2004
Location: London
Posts: 15

Rep: Reputation: 0
root privilages


Everyone seems to say that u shouldn't logon as root in cos its easy to do damage, esp if ur new to linux. But when i need to configure a new distro after install i always have to use root as my normal user just gets stuff like 'permission denied" or "command not found" . this even happens with normal stuff like , 'ifconfig eth0 up'. do i need to grant the normal user more privelages or have i gone wrong somewhere. or am i missing the point!

sorry for such a dumb question but i'm confused.
 
Old 05-30-2004, 07:07 AM   #2
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
It is always good practice to log in as a regular user, and supply the root password where necessary. Also, two great things you cna try are

1.) IN a console/command prompt u cna type

su -c 'what you want to run'
then you will be prompted for the root password so ... <enter password>

2.) also in console, kdesu to run a gui KDE program as root
then you will be prompted for the root password so ... <enter password>

hope that helps
 
Old 05-30-2004, 05:09 PM   #3
cheech66
LQ Newbie
 
Registered: May 2004
Location: London
Posts: 15

Original Poster
Rep: Reputation: 0
thanks 4 the expo- its cool that u guys take the time to help us nubis out. i'll give ur sugeestions a try now.

thanks again
 
Old 05-30-2004, 05:18 PM   #4
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
You ifconfig problem is that you don't have it in your path. You need to find ifconfig and add it to your PATH environment variable in .bash_profile etc... Anytime you get "command not found" it is usually not in your path. You will find that when you figure linux out you very rarely need to be root and when you do you will do it right.



Peace
 
Old 05-30-2004, 06:46 PM   #5
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 31
It's not just a case of adding it to the PATH - you also need permissions to do it. Not any regular user (assuming you've got permissions set up correctly) can:

$ /sbin/some_executable

Otherwise it'd be pretty poor security. I'd advise you to look into sudo - you can use the NOPASSWD option to avoid having to enter your password in all the time.
 
Old 05-31-2004, 04:48 AM   #6
fortezza
Member
 
Registered: Mar 2003
Location: Colorado
Distribution: Fedora Core 4
Posts: 297

Rep: Reputation: 30
Some more advice

There is a thingy called SUDO that you can use to give you regular account access to commands it normally cannot access, then there is SUID ( as root , chmod +s <filename> ), which lets a bin file ( executable ) run under permissions other than the person who started it.

Personally, I will log into the GUI (Gnome, KDE, etc. ) as a normal user, start a terminal session, then use "su" command to run as root in that window, and do all the configurating from there. If I need to started a graphical program as root in that console, for example, the Kate text editor, I will type "kate &" in the console so that the graphical program starts in the background, so that I can still type more commands in the console while it is running. If you don't to that, you will find the console will not respond until you close the program you started.

There ya go., that is my $.02
 
Old 05-31-2004, 07:58 AM   #7
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
ho_10,


A regular user can run ifconfig to diplay the network settings you just can't change the network settings. No big security issue there.
 
Old 05-31-2004, 08:09 AM   #8
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
Re: Some more advice

Quote:
Originally posted by fortezza
There is a thingy called SUDO that you can use to give you regular account access to commands it normally cannot access, then there is SUID ( as root , chmod +s <filename> ), which lets a bin file ( executable ) run under permissions other than the person who started it.

Personally, I will log into the GUI (Gnome, KDE, etc. ) as a normal user, start a terminal session, then use "su" command to run as root in that window, and do all the configurating from there. If I need to started a graphical program as root in that console, for example, the Kate text editor, I will type "kate &" in the console so that the graphical program starts in the background, so that I can still type more commands in the console while it is running. If you don't to that, you will find the console will not respond until you close the program you started.

There ya go., that is my $.02
That does not work for all distros! FOr example, logging in as root under a console or terminal is NOT sufficient for you to be able to open GUI programs from console as root. I have a whole topic about this issue!
 
  


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
Is there anyway to connect to the internet without root privilages? captainfreedom Linux - Newbie 2 02-28-2005 10:59 AM
Root User Privilages Jonlinuxuser Linux - Software 1 05-17-2004 06:58 PM
how do i grant privilages to 'normal users' jogurt666 Linux - General 1 12-18-2003 01:39 PM
NTFS drive - no user privilages - root only jon_k Linux - Software 2 09-01-2003 05:28 AM
Windows NT, isos, no privilages Tinky1901 Slackware 7 07-02-2003 09:41 PM

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

All times are GMT -5. The time now is 03:40 PM.

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