LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-23-2010, 12:26 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
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
 
Old 07-23-2010, 12:54 AM   #2
andreqls
LQ Newbie
 
Registered: Apr 2007
Posts: 14

Rep: Reputation: 2
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.
 
1 members found this post helpful.
Old 07-23-2010, 02:55 AM   #3
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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).
 
1 members found this post helpful.
Old 07-23-2010, 04:55 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 07-23-2010, 05:11 AM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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 .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Proftp - logging in with a user except root. How to? Seregwethrin Linux - Server 7 03-09-2008 06:17 AM
having trouble logging in as the root user thebiggiantmouse Linux - Newbie 3 06-29-2006 10:15 AM
switching between user and root without logging out redhat_marsi Linux - Newbie 7 06-13-2005 11:38 AM
Logging in as root user in the shell with suse 9.1 OverTheTop Linux - Newbie 1 07-15-2004 02:44 PM
Logging On As Root User BACTRATE Mandriva 6 02-16-2004 11:48 AM


All times are GMT -5. The time now is 11:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration