LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to avoid logging with root user? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-avoid-logging-with-root-user-821613/)

pinga123 07-22-2010 11:26 PM

How to avoid logging with root user?
 
I have created a linux machine and installed some softwares on it with root user privileges . I used to login with root user credentials for doing the various task.

Later i have realise that this is not the best practice to follow and there should be a new user with less privileges to be created for doing the day to day task.

I have read the steps to create the user but will that new user sufficient enough to do the task that i m doing it through root user?
Will my software allow the new user to work on them?
I would be glad if someone points me to a guidelines on what should be my next step?
Edit/Delete Message

andreqls 07-22-2010 11:54 PM

Installed software usually works for all users unless it specifically requires (or has been intentionally configured for) root only.

I recommend that you create a new user (try the "adduser" command, and follow its instructions) and give it a try. Whenever some task requires root privileges, you can change to root by using the command "su" and typing the root password when asked, or you can execute single root-only commands by using "sudo", though depending on your Linux distribution that last option may require some setup (try to learn about "visudo").

Performing your routine tasks as a normal user instead of root is something everybody does without much hassle, so don't worry about it; any problems you might find will probably be easy to solve. Good luck.

alli_yas 07-23-2010 01:55 AM

This is a very interesting topic and there've been numerous lengthy debates on LQ as to whether one should login as root or not.

Its (in my opinion) very dependent on what you use the machine for; and how many people have access to the machine.

If you're the only user/admin; and you have sufficient experience to know your way round Linux; then perhaps root login can be viable.

However, if there's more than one user on the machine; of varying Linux skill levels - then definitely rather disable root login. Also consider using sudoers to allow certain people to execute super user commands (via sudo).

linuxlover.chaitanya 07-23-2010 03:55 AM

root login, though debatable topic, should be avoided as much as possible even if used by single user. It is not the user but the privileges applicable to the machine as whole responsible for the damage. And even if user is experienced enough, the root privileges still give crackers a chance to exploit the system. I would definitely advise against using root login on day to day basis unless that system is a server and you only login for certain tasks for limited time. Else sudo is the way to go.

John VV 07-23-2010 04:11 AM

i agree with the last two
root login should be avoided .
BUT
there are some limited reasons to do so
-- use with EXTREME CAUTION --

for system set up ( after first boot and setting up a normal user) and hacking Gnome and/or allowing root login in the first place

fedora is a good example -- install the new version and reinstall from a backup disk your files
yes this can be done as a normal user BUT being root dose make things a bit easier. Like like reinstalling custom themes and conf files .


and

fixing a FUBAR'ed system

but that ,most likely ,will be from a live cd but not always .


All times are GMT -5. The time now is 07:27 PM.