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?

    • Offizieller Beitrag

    Is this normal behaviour?

    No. Try clearing your browser cache.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • 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 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    3 Mal editiert, zuletzt von gderf ()

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!