Creating a new 'admin' user for SSH

  • I'm wary about working in a root shell, and want to set up a sudoer account to SSH into, so I don't accidentally make a typo that messes up the system. I've heard from various people that the more you do through the webgui, the better. But I know there are some things you need SSH for.


    So,
    What's the preferred OMV way for creating an admin account that can sudo? Specifically, which groups should the new admin account belong to, so that it can SSH and administer the system like root would?

  • It needs to be in the ssh group to be able to ssh into the system. You also need to add the sudo group.


    Then you can login with that user and just execute any command with sudo command.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • It needs to be in the ssh group to be able to ssh into the system. You also need to add the sudo group.


    Then you can login with that user and just execute any command with sudo command.


    Greetings
    David

    Thanks David! Should I be concerned with any of the other groups, as they pertain to OMV? Like the sambashare group or the adm group?

  • Nope. Any other group is irrelevant since you act with root privileges.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • It needs to be in the ssh group to be able to ssh into the system. You also need to add the sudo group.


    Then you can login with that user and just execute any command with sudo command.


    Greetings
    David

    when I try to create a user I’m unable to check both ssh and sudo, one unchecked the other. Is this normal behaviour?

  • It needs to be in the ssh group to be able to ssh into the system. You also need to add the sudo group.


    Then you can login with that user and just execute any command with sudo command.


    Greetings
    David

    Hi, i created ssh user adding also sudo group, but if i use sudo commands ssh user password is required. This can be avoided?

  • You can set thing such that a username who uses sudo commands can do so without providing a password. In the shell run this and edit as shown


    Code
    sudo visudo


    Add this line to the file and then save and exit.

    Code
    username ALL=(ALL) NOPASSWD: ALL


    This would be equivalent to logging in as root and being able to run any command unchallenged. If this is not what you want, then be more specific as to any limitations you require.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

    Edited 3 times, last by gderf ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!