Hi, I've recently decided to run my NAS from a Pi using OpenMediaVault. I've hit a few speed bumps however in as much as the default username and password for the CLI (root/openmediavault) don't work. Accessing the Pi via OMV's web gui did work but did not list any users under the users section. I added a user and added the user to the groups for SSH, sudo etc. which now lets me logon via the SSH and the CLI. Now my issue lies in the session that is generated each time I login does not seem to account for any of my preferences. For example I've setup the .bashrc files to add a path for a scripts folder which works on all my other Pi's running raspian but not on OMV each time I login it does not remember my path. I have to run export PATH=$PATH...... to be able to run my scripts. I've currently also setup a cron job to run the export command daily after a reboot but again it does not appear to stick if I leave the session and start a new one.
In addition to this there is a particular script I would like to run at the same time each day but requires sudo privileges. With my previous setup running the NAS from raspian this did not matter as raspain lets the user use sudo without having to enter their password however on OMV I have to enter the password each time I use sudo. Thats fine but not when I want to automate this script. I've tried editing the sudoers file to add NOPASSWD privileges for the path to my script. This resulted in an error where the sudoers file could not be parsed which I've had to restore it. I then tried adding the NOPASSWD option for all commands issued by my user which it seemed to accept but each time I start a new session and use sudo I have to enter the password. So it appears that again my setup is not being saved. I've checked all the files I've edited sudoers and crontab and my edits are there but just don't seem to be having any effect on my setup. Any help in understanding why and what i can do to fix it would be appreciated.