Linux Operating System (MOSC)

MOSC Banner

How to protect users like "oracle" or "grid" from being accessed by "root" user?

edited May 2, 2022 2:10AM in Linux Operating System (MOSC) 5 commentsAnswered

Hello.

Environment:

Many of the Linux and AIX machines at our customer sites are deployed by our company.


Question:

How to protect users like "oracle" or "grid" from being accessed by the "root" user.

Is there a documented way to achieve this goal?

  • Customers should know password of 'root' user
  • blocking the root user is not an option
  • restrict /rm 'su' is not an option

Workaround:

I wrote a bash script 'addsec' and added it to the '/etc/profile.d/bash.sh' environment:

/bin/bash /home/oracle/bin/addsec

 The content of this script is hidden with 'shc'. This script asks for an additional password if someone tries to connect to a protected user. In addition, the script can identify whitelisted users by sms or email (one-time passwords) and send the log to a remote SNMP server with encrypted fs. The second script (monitor) runing in memory and checking for modification of the '/etc/profile.d/bash.sh' file, if it has been modified by someone, the script immediately recreates this file.

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center