Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Can anyone tell me how can iI give root privilegis to a user because I want to install oracle and it says that I don't have to do it like root but also I have to install php with oracle and apxs and I need to do that as root
But I don't want to became root I jast want to remain a user but with root rights. Is there any command that as root I can give to a user root's wrights
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602
Rep:
This is what sudo does. If you type "sudo ls" you will remain you, but the ls command will be executed as root. You can specify what users can execute what commands in the config file.
If you 'wish to make a user permanently root equivalent, like I did with my Admin account. You have to do a sort of hack.
Here's the steps to do it:
1. Log in as root
2. edit your /etc/passwd file with an editor
3. search for the loginname of your user
4. you will find a line like this:
admin:x:501:501:admin:/home/admin:/bin/bash
1 2 3 4 5 6 7
5. Don't worry if the numbers after the X are different
This is what they mean:
1= Loginname
2= Encrypted password, here it is a shadowpassword
3= The User ID
4= The Group ID
5= The name of the user
6= The homedirectory of the user
7= The login shell of the user
6. All you have to do now, is to change both the user and the group ID to 0 which means the User ID = ROOT and group ID = ROOT
7. Now login as the new user and you have root equivalency.
One minor problem is that from now you will receive all the mail that the root user receives also. You share one emailbox, that is the ROOT email.
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857
Rep:
The root user is a superuser and you should never create an equivalent account. Its a gross security violation and a very poor safety practice. I know all the excuses people give for doing it.. but sooner or later.. you WILL get bit in the butt by it, either through security or by making a mistake yourself.
SUDO will allow users to perform certain actions as 'root'. That should only be used in instances where the application is not fully matured to allow ordinary users to run it.
I don't understand why you need this access, however. Simply become 'root', install Oracle and the other stuff, then run them as a regular user. Just like any other app.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.