LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I give a useraccount root powers? (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-give-a-useraccount-root-powers-456362/)

esc_5p1d0r 06-19-2006 05:54 PM

Can I give a useraccount root powers?
 
Is there a way to give a user account root abilities?

vimal 06-19-2006 05:57 PM

Hello esc_5p1d0r,

You can give a user root privileges by adding him to the sudoers list. The user can switch to the root user by executing the sudo command. Please reply if you have any doubts..

Thanks...

esc_5p1d0r 06-19-2006 05:58 PM

Um... how do I add them to the sudoers list?

vimal 06-19-2006 06:02 PM

Hello esc_5p1d0r,

Edit the /etc/sudoers file where you can see the format. Just add the username there and save the file. After that try logging in as root by issuing the command 'sudo su -'. This will prompt for your password, after entering it you will be presented with the root prompt.

Thanks...

mcmillan 06-20-2006 07:32 PM

It might be necessary to install a package for sudo first, I'm not certain all distros have it by default. Also I'd recommend using the command visudo rather than directly editing the file. Doing it this way will check to make sure you have the write syntax.

sundialsvcs 06-20-2006 07:42 PM

One of the most serious mistakes that you can make in a Linux system is to "give someone other than root super powers." That's repeating the old Windows mistake, and it has exactly the same very-harmful consequences.

When you, or anyone at all, logs-in to your system, they should be a non-privileged, ordinary-Joe user. (The same is true in Windows, where they're called "limited users.")

You should designate one account, not normally used, in which to do all non-rootly system maintenance. And you should reserve root strictly for those tasks which demand it.

Here's why...

On any system of any type, you cannot prevent a program from somehow finding its way into your system and being run 'by you.' [All the money you spend on "anti-virus" programs, which try to do precisely that, is (imho) wasted.]

But you can prevent the program from succeeding!

"Nasty programs" require considerable privileges to be able to do their nasty things. On a "typical" Windows system that's easy, because every Joe-user has unlimited powers. But if those same nasty-programs are run by a user with no privileges at all, they don't succeed. They can't.

This is done by very careful design, and it's your best ally.

scweej 06-21-2006 01:31 AM

i agree ...

think of having a root account as insurance against stuff ups...

u might have to type some extra chars but it will save u a lot of trouble.


All times are GMT -5. The time now is 10:35 PM.