Problem
There is a problem when user dijk execute command below:
$ sudo usermod -aG vboxsf dijk
or
$ sudo gpasswd -a dijk vboxsf
Problem: “dijk is not in the sudoers file. This incident will be reported.”
Solution
$ su root
// add write priviledge
# chmod u+w /etc/sudoers
// add dijk line after root line, below
# vi /etc/sudoers
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
dijk ALL=(ALL) ALL
# su dijk
$ sudo usermod -aG vboxsf dijk
[sudo] password for dijk:
// input dijk's password, above
$ su root
// del write priviledge
# chmod u-w /etc/sudoers
Other commands may need
// see user dijk info
$ id dijk
// see group info
$ vi /etc/group
// remove dijk from vboxsf group
$ sudo gpasswd -d dijk vboxsf
// see group info, confirm user dijk really removed from vboxsf
$ vi /etc/group