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. |
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?
|
Quote:
|
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. |
Quote:
|
Quote:
Anyway if you know the root password you can get a root shell with: Code:
su - |
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' |
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.
|
Quote:
You haven't given any specific examples of which tasks are problematic, it is hard to discuss this in the abstract. |
Quote:
|
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.
|
Quote:
|
Quote:
Code:
sudo -i |
Quote:
|
Quote:
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. |
Interesting. Didn't know that. I had a look at the man page earlier but I didn't see su unless it's just a combination of the s and u options.
|
I think I see what you're getting at. sudo su just starts a shell as root and reads the .bashrc or whatever shell you're using but not .profile. I still don't see su in the sudo man page but I'm guessing it's similar to running su just with sudo before it. Either way it's very useful knowledge.
|
Quote:
|
All times are GMT -5. The time now is 01:27 AM. |