how to change default root user

  • Hi,
    Usually, in Debian installation, if you don't give a pass for root user, you can create another user and issue root cmds with sudo. When installing OMV, I give a pass to root user, but want to delete it, for security reasons. It is possible? And how to create another user which will have root privileges with sudo only?

    = Fujitsu PRIMERGY TX1310 M3 • 2 x HDD 3.5" 4TB Western Digital Red • Windows Server 2019 • Hyper-V • OMV 5.x =

  • For the WebUI the user "admin" is mandatory. I think for any other purpose It should be possible to create a different user which belongs to the sudo group. I assume this must be done with CLI. But I would not delete 'root' but disable it if possible.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • I assume this must be done with CLI.

    I think that was not correct. It should be also possible with OMV access rights management.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • You create a normal user.


    Then you make this normal user a member of the group sudo.


    Done!


    Usually you also want to make the normal user a member of the group ssh, to allow remote access.


    This way you don't ever have to login as root. You don't need remote root access. Whenever you need root privileges you use sudo. This is how I have done it for many years. This is also default in Ubuntu.


    If you want to delete the password for root, with root privileges do this:


    passwd -d root


    After this it will no longer be possible to login as root.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited once, last by Adoby ().

  • Im not turning off ssh root yet it is nedeet for the moment

    Im doing clearly something wrong.


    I create a user grafi via omv web interface.
    I add this user to following groups :sudo; ssh;tty;


    When i login as root via ssh and execute command
    less /etc/passwd it shows

    grafi:x:1000:100:standard cli user:/home/grafi:/bin/sh


    but when i login as grafi via ssh i get

    ssh grafi@192.168.0.14

    grafi@192.168.0.14's password:

    (... ... ...)

    Could not chdir to home directory /home/kuba: No such file or directory$


    To what group i should add my user to be able to enter his home dir ??


    Thanks for help in advance

  • In the user settings under the webui... Change your shell to /bin/bash and also make sure you have home directories enabled.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


    Edited once, last by KM0201 ().

Participate now!

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