
Hi All,
First time post on Solus Forums and feeling great to join the community! I'm loving Solus to the point that I have almsot replaced all my computer OS's with Solus. Have currently rebuilt my home theatre PC with solus and have installed openZFS to set myself up with a raid 6 config for storing all my media. Working sweet! Now I am building a conky widget to show my stats on my zpool to which I need to execute some readonly commands to get the zpool stats (e.g. health status & available space). However my problem is I cant execute zfs commands without root. And I am now seekign help here. The blog site that I followed for guidance on installing zfs should have a post here on Solus forums but I dont seem to be able to locate it.
Ok, so more to the point now. I feel like Solus is not acknowledging my edits to sudoers file. Using visudo I add my zfs and zpool commands to allow execution without password yet I am always prompted for root password using these two zfs tools. As a test I also added mkdir command to sudoers but that too is askign for password?! I feel like there is somethign different with Solus distro that I am not aware of that is overriding my sudoers edits. I know Solus is a stateless OS but my edits save to the /etc location thus they should override install defaults shouldn't they?
I did find that if I chown /dev/zfs to my user and group that I can then execute without passwords but this is not the right way of doing things. Plus after reboot the system rightfully changes permissions back to root:root.
Any help or advice much appreciated.
Paul.
Some info below:
sudoers file:
`
#Solus doesn't support "local" directories, so you need to uncomment this line
#and comment out the other secure_path declaration if you want sudo to find these
#executables
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
#Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/bin"
#User privilege specification
root ALL=(ALL) ALL
htpc ALL=(root) NOPASSWD: /usr/local/sbin/zfs, /usr/local/sbin/zpool
htpc ALL=(root) NOPASSWD: /bin/mkdir
`
I have also tried with ALL=(ALL).
I also changed the secure_path as you can see.
sudo -l command:
`Matching Defaults entries for htpc on htpc:
secure_path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
User htpc may run the following commands on htpc:
(root) NOPASSWD: /usr/local/sbin/zfs, /usr/local/sbin/zpool
(root) NOPASSWD: /bin/mkdir
(ALL) ALL
`
I have also briefly played with zfs allow command to the filesystem but still researching if I am understanding that correctly but I still think I have an issue with sudoers on Solus as mentinoed above.