Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
(I've found googling something about sudo -s but that isn't usefull in my case...)
With sudo you can use the "NOPASSWD" tag to prevent asking for a password. Of course you (should) understand the implications of allowing anyone root account access w/o having to know the pass. At least use something with logging capabilities like rootsh instead of su if you're not the only one who will have root account access this way.
I think that there must be any way to do this.... I can remotely access to a my server throught ssh with a ssh public/private key, without password, also I can switch to root by typing "sudo -" (and having the apropiates entries in /etc/sudoers).....
So, I think that something similar must be....let's continue googling.... If I found the way, I'll tell you...
(I've found googling something about sudo -s but that isn't usefull in my case...)
With sudo you can use the "NOPASSWD" tag to prevent asking for a password. Of course you (should) understand the implications of allowing anyone root account access w/o having to know the pass. At least use something with logging capabilities like rootsh instead of su if you're not the only one who will have root account access this way.
Hi!
I can do this with sudo, but the problem is that this way, isn't run the .bashrc file of root.... and I've some things I need to be run when a root session is opened.
log in as root, then type "visudo". add this line to the section that says "# Members of the admin group may gain root privileges":
user ALL=(ALL) NOPASSWD: ALL
where "user" is your real user name. then all commands that you need to run as root can be preceded with "sudo" and it will run with root privileges. you can also do "sudo su" which will give you the root shell without the password.
log in as root, then type "visudo". add this line to the section that says "# Members of the admin group may gain root privileges":
user ALL=(ALL) NOPASSWD: ALL
where "user" is your real user name. then all commands that you need to run as root can be preceded with "sudo" and it will run with root privileges. you can also do "sudo su" which will give you the root shell without the password.
Great!!!
I had already that line, but I didn't realised of doing "sudo su" instead of "sudo -s".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.