![]() ![]() Now tom can su oracle and if you need to give other users the same access, add them to oracle group. This will allow any user that is part of the to su add auth rule lines so the section looks like this: # This allows root to su without passwords (normal operation)Īuth pam_succeed_if.so user = Īuth sufficient pam_succeed_if.so use_uid user ingroup ![]() Now edit /etc/pam.d/su and under the following: # This allows root to su without passwords (normal operation) Note: In your case, you already have the group because oracle group would have been created when you made the oracle user with adduser oracle. The group changes might not take affect until next login. Usermod -a -G (or usermod -a -G oracle tom). Then add that group to each user that you want to be able to su to that user without a password: Once you have set up a new user account with sudo privileges, you can configure the sudoers file to allow that user to execute all commands without entering a. In my situation I needed to allow multiple users to su to a specific user.Ĭreate a group using addgroup that other users will be able to su to without a password. I needed to do this to a system recently and had a hard time finding my notes on the alternate setup i used years ago that also allowed the syntax su. testuser ALL(ALL) NOPASSWD: /home/testuser/script.sh Ive also tried. Its a very dirty trick wish leaves your system open for other dangers but I am guessing you know what you are doing and want this. You can find the absolute path to a program by using which on a terminal.So Ive used visudo tried added the following line as both the 1st and last line in the file. on your program you can then use sudo shutdown -r now without having to type the sudo password. Create a group using addgroup that other users will be able to su to without a password.For instance, I'd like to allow Tom the DBA to su to the oracle user, but not to the tomcat user or root. Im trying to allow a specific user to run a specific command with sudo but not be prompted for a password in CentOS 7. In my situation I needed to allow multiple users to su to a specific user. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |