Autostart in VirtualBox 5.1.18 and Solaris 11.3
Posted: 15. Apr 2017, 21:58
This post is regarding the discussion on Ticket #11720 (https://www.virtualbox.org/ticket/11720) which seems not be solved after all and remains until now in VirtualBox 5.1.8. So I'm posting it here in case that ticket do not grab attention by referring to a rather old version of VirtualBox. Here's my comment to that ticket:
-----------------------------------------
Hello Sirs,
I'm on Solaris 11.3 (GA aka "release repo") and VirtualBox 5.1.18 and the issue seems to persist although all the previous discussion remains pretty much valid. What I would suggest further investigation is that the "logins -g" command may have a bug as it correctly returns user logins only if those user logins have the value of the "-g" parameter as their primary group. For instance, if the primary group of users user1 and user2 is staff all will work as expected (no bug revealed). But if vboxuser is their secondary group and we select that group on the respective SMF property (implying that we'll run a "logins -g vboxuser") no login will be returned by logins and the script will fail.
The suggestion for a fix perhaps could be to adjst the line that contains "logins -g $VW_VBOXGROUP | cut -d' ' -f1" to the following:
Regards!
-----------------------------------------
I hope I could have made some mistake, but if not I'd like to ask a fix.
Thanks!
-----------------------------------------
Hello Sirs,
I'm on Solaris 11.3 (GA aka "release repo") and VirtualBox 5.1.18 and the issue seems to persist although all the previous discussion remains pretty much valid. What I would suggest further investigation is that the "logins -g" command may have a bug as it correctly returns user logins only if those user logins have the value of the "-g" parameter as their primary group. For instance, if the primary group of users user1 and user2 is staff all will work as expected (no bug revealed). But if vboxuser is their secondary group and we select that group on the respective SMF property (implying that we'll run a "logins -g vboxuser") no login will be returned by logins and the script will fail.
The suggestion for a fix perhaps could be to adjst the line that contains "logins -g $VW_VBOXGROUP | cut -d' ' -f1" to the following:
Code: Select all
for VW_USER in $(echo $(logins -g $VW_VBOXGROUP | cut -d' ' -f1) $(getent group $VW_VBOXGROUP | cut -d: -f4 | tr , ' ') | xargs -n1 | sort -u)
-----------------------------------------
I hope I could have made some mistake, but if not I'd like to ask a fix.
Thanks!