Configuring Individual User Logins In RHEL 6

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Configuring Individual User Logins In RHEL 6

  • Creator
    Topic
  • #55217
    Greg Tataryn
    Participant

      We have set up LDAP authentication on our RHEL server so that each of our team members can log in with their domain accounts to the terminal. We are attempting to set up sudo access for hcienginerun and hcisitectl so we have to use sudo to the hci user to run those commands but are running into issues.

      When using sudo -u hci hcisitectl or sudo -u hci hcienginerun I am getting responses that various environment variables are not set even though in my .bashrc file it calls on the /home/hci/.profile to initialize the environment. What else am I missing with trying to get sudo configured?

    Viewing 2 reply threads
    • Author
      Replies
      • #84601
        David Barr
        Participant

          Maybe you need to run “sudo -i”. There are different shell startup files (/etc/profile, $HOME/.bashrc, $HOME/.bash_profile, $HOME/.profile), and which ones get run depends on whether you have a login shell, interactive shell or non-interactive shell.

        • #84602
          Greg Tataryn
          Participant

            It is interesting that if I am logged in and don’t initialize anything then use “sudo -i -u hci hcisitectl” the command runs. If I run any sort of environment initialization, such as running the /home/hci/.profile, the command won’t work and barks at me that some of the environment variables are not set.

            I need the environment set so I can run most commands under my username but those two or three commands that need to be run as hci we need to be able to use sudo for. Any additional help with the configuration is greatly appreciated.

          • #84603
            David Barr
            Participant

              Can you post (or email) the contents of the initialization files and the output of the failed command?

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.