Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.