8.3.7.2 Running dbnodeupdate.sh Using sudo

Before using dbnodeupdate.sh using sudo, you configure the /etc/sudoers file.

  1. Log in as the root user and edit /etc/sudoers using visudo.
    # visudo
  2. Add the following entry (all on one line) to the bottom of the sudoers file to allow non-root users, such as the oracle user, to run dbnodeupdate.sh as root:

    Note:

    The first field in the line specifies the non-root user who is granted sudo access for the dbnodeupdate.sh command. The line below uses the oracle user as an example. You can specify a different user if necessary.
    oracle  ALL=(ALL)    NOPASSWD:SETENV: /u01/stage/patch/dbnodeupdate/dbnodeupdate.sh
    
  3. As root, create the /u01/stage/patch/dbnodeupdate directory and unzip dbnodeupdate.zip:
    # mkdir -p /u01/stage/patch/dbnodeupdate
    # cp dbnodeupdate.zip /u01/stage/patch/dbnodeupdate
    # cd /u01/stage/patch/dbnodeupdate
    # unzip dbnodeupdate.zip
    

To verify that the setup is correct, run dbnodeupdate.sh in prereq check mode as the oracle user:

[oracle]$ cd /u01/stage/patch/dbnodeupdate

[oracle]$ sudo ./dbnodeupdate.sh -u -l http://my-yum-repo/yum/EngineeredSystems/exadata/dbserver/12.1.2.1.3/base/x86_64/ -v

dbnodeupdate exits if it is run without root privileges.

Note:

  • The above setup requires that everything in /u01/stage/patch/dbnodeupdate be owned by the root user.
  • If you update the dbnodeupdate utility, then you must place the new version in the same location as specified by sudoers.