install_vertica with disabled root shell

MIC_VP_PLMIC_VP_PL Community Edition User

Hello, is there a way to install Vertica on environment where root shell is disabled and i have only access to user with sudo ALL? For the sake of simplicity lets call that user sudouser
When I run sudo ./install_vertica it errors:

Getting system information for cluster (this may take a while)... Error: Default shell on the following nodes are not bash. Default shell must be set to bash. 192.168.0.2 /sbin/nologin Exiting... Installation FAILED with errors.

sudouser from which I lunch installation have shell configured to /bin/bash, but disabled root account has shell configured to /sbin/nologin

I have read in install_vertica --help:

When the SUDO_USER environment variable is set, install-vertica attempts to ssh as that user. This is the case when invoked with 'sudo'. Otherwise, install-vertica will ssh as root. The credentials provided with these options must match the ssh user.

I have set SUDO_USER=sudouser but got the same error.

Any ideas?

Thanks, M

Best Answer

  • MIC_VP_PLMIC_VP_PL Community Edition User
    Answer ✓

    Ok found an answer sudo -s ./install_vertica did the trick

    man sudo
    -s, --shell
    Run the shell specified by the SHELL environment
    variable if it is set or the shell specified by the
    invoking user's password database entry. If a command
    is specified, it is passed to the shell for execution
    via the shell's -c option. If no command is specified,
    an interactive shell is executed. Note that most
    shells behave differently when a command is specified
    as compared to an interactive session; consult the
    shell's manual for details.

Answers

  • SruthiASruthiA Vertica Employee Administrator

    Based on the log snippet provided, it looks like it is exiting because bash is not the default shell. If you have set bash is the default shell, please add the following in /etc/sudoers file and try installing vertica

    Defaults:dbadmin !requiretty
    dbadmin ALL=(ALL) NOPASSWD:ALL

  • MIC_VP_PLMIC_VP_PL Community Edition User
    edited May 2022

    Hi SruthiA, thanks for quick reply but I think You misunderstood the problem.
    I don't have dbadmin user because account will be created by install_script and ‑‑dba-user option.
    Problem is that i cannot start install_script because it always defaults to root account which shell is set to /sbin/nologin (cant change it, security), even when i run script with sudo as sudouser which default shell is set to /bin/bash

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file