Changes between Initial Version and Version 1 of Ticket #11720, comment 13
- Timestamp:
- Apr 15, 2017 10:03:22 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11720, comment 13
initial v1 3 3 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. 4 4 5 The suggestion for a fix perhaps could be to use "getent group $VW_VBOXGROUP | cut -d: -f4 | tr , ' ' | xargs -n 1" instead of "logins -g $VW_VBOXGROUP | cut -d' ' -f1". 5 The suggestion for a fix perhaps could be to adjst the line that contains "logins -g $VW_VBOXGROUP | cut -d' ' -f1" to the following: 6 7 for VW_USER in $(echo `logins -g $VW_VBOXGROUP | cut -d' ' -f1` `getent group $VW_VBOXGROUP | cut -d: -f4 | tr , ' ' | xargs -n1` | xargs -n1 | sort -u) 6 8 7 9 Regards!