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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-30-2004, 06:53 AM
|
#1
|
LQ Newbie
Registered: May 2004
Location: London
Posts: 15
Rep:
|
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.
|
|
|
05-30-2004, 07:07 AM
|
#2
|
Member
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556
Rep:
|
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 
|
|
|
05-30-2004, 05:09 PM
|
#3
|
LQ Newbie
Registered: May 2004
Location: London
Posts: 15
Original Poster
Rep:
|
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
|
|
|
05-30-2004, 05:18 PM
|
#4
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 185
Rep:
|
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
|
|
|
05-30-2004, 06:46 PM
|
#5
|
Member
Registered: Jul 2003
Location: London
Posts: 548
Rep:
|
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.
|
|
|
05-31-2004, 04:48 AM
|
#6
|
Member
Registered: Mar 2003
Location: Colorado
Distribution: Fedora Core 4
Posts: 297
Rep:
|
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
|
|
|
05-31-2004, 07:58 AM
|
#7
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 185
Rep:
|
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.
|
|
|
05-31-2004, 08:09 AM
|
#8
|
Member
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556
Rep:
|
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! 
|
|
|
All times are GMT -5. The time now is 11:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|