LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 11-29-2012, 04:57 AM   #1
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Rep: Reputation: Disabled
Root Login


Do Company persons login as root or a regular user? If they login as regular user, then how do they manage their operations which can only be performed by root.

I am doing root user operations using sudo but its very frustrating.
 
Old 11-29-2012, 05:11 AM   #2
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Hi, can you explain the frustration of using 'sudo'? I'm not sure I understand the question; which tasks specifically you are having trouble accomplishing with 'sudo'? Also, which distribution are you using, and have you read your distro's documentation about sudo/root user?
 
Old 11-29-2012, 05:55 AM   #3
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by snowpine View Post
Hi, can you explain the frustration of using 'sudo'? I'm not sure I understand the question; which tasks specifically you are having trouble accomplishing with 'sudo'? Also, which distribution are you using, and have you read your distro's documentation about sudo/root user?
Means I have habit of directly entering commands, and with sudo every command has to be prefixed with sudo. I am using RHEL.
 
Old 11-29-2012, 06:00 AM   #4
steelneck
Member
 
Registered: Nov 2005
Distribution: Slackware, Arch
Posts: 43

Rep: Reputation: 8
The only ones who login as root should be system admins, not regular users.

You have to give us examples of the "root-operations" you have in mind. Normally a regular user can use all programs on the system, with the exception of those installed under sbin and those programs are restricted for very good reasons. If you talk about accessing CDs, scanners and so on, this can usually be solved by having users with the right group permissions.
 
Old 11-29-2012, 06:06 AM   #5
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by steelneck View Post
The only ones who login as root should be system admins, not regular users.

You have to give us examples of the "root-operations" you have in mind. Normally a regular user can use all programs on the system, with the exception of those installed under sbin and those programs are restricted for very good reasons. If you talk about accessing CDs, scanners and so on, this can usually be solved by having users with the right group permissions.
Like installing packages using yum or configuring any services.
 
Old 11-29-2012, 06:09 AM   #6
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by sunveer View Post
Means I have habit of directly entering commands, and with sudo every command has to be prefixed with sudo. I am using RHEL.
Which is bad why? You really aren't giving enough details to help us answer your question. So far in this thread you have typed 417 characters, which is equivalent to typing 'sudo<space>' 83 times, in your quest to avoid 5 keystrokes.

Anyway if you know the root password you can get a root shell with:

Code:
su -
If you don't know the root password and your admin has asked you to use 'sudo' you'll have to discuss it with him/her.

Last edited by snowday; 11-29-2012 at 06:25 AM.
 
Old 11-29-2012, 06:18 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
As stated before by others: do not become root unless you really, really need to.

If typing 5 extra characters is a problem or you are prone to forget the sudo<space> part: Why don't you alias those commands?
Code:
alias xyx='sudo xyz'
 
Old 11-29-2012, 06:19 AM   #8
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
I am the admin and since it is advised to login as regular user instead of root user for security reasons, that's why I want to ask how can I manage my work while logged in as regular user. Or I have to login as root to perform the day to day work.
 
Old 11-29-2012, 06:24 AM   #9
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by sunveer View Post
I am the admin and since it is advised to login as regular user instead of root user for security reasons, that's why I want to ask how can I manage my work while logged in as regular user. Or I have to login as root to perform the day to day work.
My recommendation is to log in as regular user for everyday tasks and use 'sudo' or 'su -' to perform only those tasks which require root priv's.

You haven't given any specific examples of which tasks are problematic, it is hard to discuss this in the abstract.
 
Old 11-29-2012, 06:35 AM   #10
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by snowpine View Post
My recommendation is to log in as regular user for everyday tasks and use 'sudo' or 'su -' to perform only those tasks which require root priv's.

You haven't given any specific examples of which tasks are problematic, it is hard to discuss this in the abstract.
It is no hard but since its my first time using sudo so I forget to enter sudo every first time. But thanks to tell me that I am doing the things the right way.
 
Old 12-06-2012, 08:29 PM   #11
Adickel
LQ Newbie
 
Registered: Jul 2009
Posts: 14

Rep: Reputation: 0
I work in an enterprise Linux environment, I have root access to all our Linux environments and regularly login as root, a lot of my work just can't be done as a regular user.
 
Old 12-19-2012, 03:39 AM   #12
solarisguy
Member
 
Registered: Aug 2010
Location: Seattle
Distribution: CentOS, RHEL, Oracle Enterprise Linux, Solaris, BSD
Posts: 64

Rep: Reputation: 21
Quote:
Originally Posted by Adickel View Post
I work in an enterprise Linux environment, I have root access to all our Linux environments and regularly login as root, a lot of my work just can't be done as a regular user.
Use "sudo su -" to become root. It leaves an audit trail for activities of your user account, yet allows you to operate without prepending "sudo" to every command.
 
Old 12-19-2012, 07:24 AM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by solarisguy View Post
Use "sudo su -" to become root. It leaves an audit trail for activities of your user account, yet allows you to operate without prepending "sudo" to every command.
The correct way to get a root shell using sudo is
Code:
sudo -i
 
Old 12-20-2012, 01:13 AM   #14
wstewart
Member
 
Registered: Dec 2012
Location: Tampa, FL
Distribution: Slackware, FreeBSD, CentOS
Posts: 41

Rep: Reputation: 1
Quote:
Originally Posted by TobiSGD View Post
The correct way to get a root shell using sudo is
Code:
sudo -i
That's just one way of doing it unless you can think of a reason why one souldn't use "sudo su". It works just as well and is probably a little easier to type.
 
Old 12-20-2012, 01:45 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by wstewart View Post
That's just one way of doing it unless you can think of a reason why one souldn't use "sudo su". It works just as well and is probably a little easier to type.
No, it doesn't work the same/just as well.

sudo -i simulates a login shell and sets environment accordingly.
sudo su a partial environment is set (no .profile/.login is read).

Have a look at the sudo man page.
 
  


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
Can't boot Wary Puppy Linux anymore, login: root (automatic login) theADOLESCENT Linux - Newbie 9 09-16-2012 06:13 PM
Unable to login using root after changing root password using passwd command rodimail SUSE / openSUSE 3 12-27-2011 10:34 PM
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 03:44 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 06:45 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
Open Source Consulting | Domain Registration