Posts by semitones

    Hi,


    I'm having trouble mounting disks in OMV.

    sdb -- this was working in OMV 3 before I did a fresh install of OMV 5

    sdc -- this wasn't mounting in OMV 3.



    In the web interface, disks sees the following (sorry for the huge image):

    MP6cAgo.png




    file systems sees this


    hQml4Yu.png



    notice that file systems sees devices that Disks does not see.


    On the commandline, I have this information:

    Code
    $ blkid
    /dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="592B-C92C" TYPE="vfat" PARTUUID="8e92d448-01"
    /dev/mmcblk0p2: LABEL="rootfs" UUID="706944a6-7d0f-4a45-9f8c-7fb07375e9f7" TYPE="ext4" PARTUUID="8e92d448-02"
    /dev/sda1: UUID="0012-D687" TYPE="vfat"
    /dev/sdc2: LABEL="Seagate Backup Plus Drive" UUID="4644636B44635CA5" TYPE="ntfs" PTTYPE="atari" PARTLABEL="Basic data partition" PARTUUID="cd03214c-767f-4473-84a6-7f99999521f5"
    /dev/sdb1: LABEL="2-ext4" UUID="a8b2073b-f14f-4987-b966-aeafb72b0254" TYPE="ext4" PARTUUID="c940b2af-01"


    I can do sudo mount /dev/sdb1 /mnt temporarily with no errors

    I can mount sdc2 with no errors

    sda1 is mounted by OMV to /srv/dev-disk-by-id-usb-SMI_USB_DISK-0-0-part1


    Trying to mount sdb1 in the web interface gives the following errors:


    Error #0:
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; mount -v --source '/dev/disk/by-label/2-ext4' 2>&1' with exit code '32': mount: /srv/dev-disk-by-id-usb-SMI_USB_DISK-0-0-part1: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error. in /usr/share/php/openmediavault/system/process.inc:182
    Stack trace:
    #0 /usr/share/php/openmediavault/system/filesystem/filesystem.inc(738): OMV\System\Process->execute()
    #1 /usr/share/openmediavault/engined/rpc/filesystemmgmt.inc(931): OMV\System\Filesystem\Filesystem->mount()
    #2 [internal function]: Engined\Rpc\OMVRpcServiceFileSystemMgmt->mount(Array, Array)
    #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('mount', Array, Array)
    #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('FileSystemMgmt', 'mount', Array, Array, 1)
    #6 {main}


    Trying to mount sdc2 gives me the following errors:


    Error #0:
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; mount -v --source '/dev/disk/by-label/2-ext4' 2>&1' with exit code '32': mount: /srv/dev-disk-by-id-usb-SMI_USB_DISK-0-0-part1: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error. in /usr/share/php/openmediavault/system/process.inc:182
    Stack trace:
    #0 /usr/share/php/openmediavault/system/filesystem/filesystem.inc(738): OMV\System\Process->execute()
    #1 /usr/share/openmediavault/engined/rpc/filesystemmgmt.inc(931): OMV\System\Filesystem\Filesystem->mount()
    #2 [internal function]: Engined\Rpc\OMVRpcServiceFileSystemMgmt->mount(Array, Array)
    #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('mount', Array, Array)
    #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('FileSystemMgmt', 'mount', Array, Array, 1)
    #6 {main}


    Please let me know if there's anything for me to try. :)

    When I try to install regular updates from within the webgui (after not updating in a while) I get the following error:


    (Also, this error repeats itself until I close the window).

    Hello, I have a problem in my iptables


    All those postrouting codes are messing things up. I don't know how they got there, but I suspect that the openmediavault-openvpn puts them there. I have temporarily removed them with the command `# iptables -t nat -F POSTROUTING`but I do not know how to make this change permanent. (For context: OMV used to be 192.168.1.175, but I have since changed my network and it now has the IP address of 192.168.2.157)


    I do not see any of these in the webgui section. My "firewall" section of the GUI has no rules populating it, and there's nothing like this in the OpenVPN plugin. I'm not even sure if the openVPN plugin makes this change, but it is the most likely actor responsible.


    I've heard that the iptables config resides in `/etc/openmediavault/config.xml` but I don't want to mess with this if I don't have to.



    Thanks!

    EDIT: SOLVED. I just had to look through my nginx configuration screens and make sure they were exactly set up as in the images.

    I don't use RPI, can't help you much.
    Your error seem to be PHP-FPM related.


    Clear out your histories/cookies, and start a fresh NC installation.


    Check this out: scalescale.com/tips/nginx/502-bad-gateway-error-using-nginx/

    Hey, thank you for this guide!


    I started a fresh installation of NC and ran into this same issue. Maybe there is a problem with the php settings?


    I followed the link, and found this


    > Nginx with PHP-FPM: same as Apache example, let’s imagine your php daemon stop working, or get’s overloaded by requests, it will not work properly and the all the php requests from nginx would not be served, so, a 502 Bad Gateway error will appear. How to fix it? Restart php-fpm daemon and check the logs.


    I was wondering what is the best way to restart php-fpm, check the logs, and troubleshoot this?


    EDIT: SOLVED. I just had to look through my nginx configuration screens and make sure they were exactly set up as in the images

    PS- The OpenVPN mobile app is called OpenVPN Connect (in the Google Play Store). You have to get the zipped cert file on your phone, unzip it and then import it. The is a drop down to import in that app. You can guide it to where you have those files.

    When I download the zipped file, it unzips to be a .crt file. But the OpenVPN clients all want .ovpn files. What am I doing wrong?


    EDIT: I realized the zip contains ALL the needed files after all.

    Thanks for your help -- I just didn't know how to enable the *testing* repo of OMV extras, but figured out how. I'm installing fail2ban now, via the GUI.


    To enable the testing repo of OMV-extras, just need to go to "OMV-extras" on the webgui and there is an option to enable it.


    Thanks!


    P.S. The output of the code is now:


    Code
    $ apt-cache policy openmediavault-fail2ban
    openmediavault-fail2ban:
    Installed: 1.3.1
    Candidate: 1.3.1
    Version table:
    *** 1.3.1 0
    500 https://dl.bintray.com/openmediavault-plugin-developers/erasmus-testing/ jessie/main amd64 Packages
    100 /var/lib/dpkg/status
    1.3.0 0
    500 https://dl.bintray.com/openmediavault-plugin-developers/erasmus-testing/ jessie/main amd64 Packages

    I have three questions related to setting up OpenVPN:


    1. For the DNS server section, is that used to assign the vpn client an internal IP address? I have a pi-hole DNS server running on the network at 192.168.1.185. Could I put that as the DNS server?


    2. I got this warning in the OpenVPN logs. Is there any way to take this problem into account without messing with the IP addresses of my LAN?


    NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.


    3. My friend told me that security best practices are setting up a firewall to autoblock IP addresses after 3 failed login attempts. Can I accomplish that from within the webgui, or do I use the CLI for that?


    Thanks!

    When I tried this in OMV 3.0 I followed the same steps, but got an error after applying the "secure connection portion.


    Here is the error:


    (admin cannot login locally because the shell is set to /usr/sbin/nologin


    I think I understand now. This is the "admin:openmediavault" account for webgui. I thought you meant admin like administrator or root account, which can login locally.


    And just so you know, if you use the OMV ISO and don't create a root account, the installer creates a user account with sudo powers, and you can login locally with that account. So it is still possible to login locally.


    Sorry for the confusion, and thanks for helping.

    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?

    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?

    When you select every package in the web interface, it tries to install every one of those packages. It does not execute and apt-get upgrade or dist-upgrade which knows how to deal with dependencies and removes old packages while installing new packages. So, this isn't really a bug because it is doing exactly what you are telling it to do - install the packages it wants to uninstall. That is why it works deselecting those two packages. There is no way to fix this. I suggested adding an update all packages button which would work but someone would still select all packages then click install and have a failure.

    If you don't enter a root password during install, how do you login with root/password after it boots?

    For the software update button, what you describe would be very useful! I ended up running apt update & upgrade from the CLI.


    On my first installation without root, I logged in with username/password. I recently reinstalled, this time with a root password. So now I can login with root/password. Should I not be able to?