aws-greengrass-nucleus icon indicating copy to clipboard operation
aws-greengrass-nucleus copied to clipboard

addUserToGroup does not support Busybox

Open cthulhuology opened this issue 3 years ago • 1 comments

The function addUserToGroup uses usermod under the hood to add a user to a group

runCmd("usermod -a -G " + group + " " + user, o -> {

https://github.com/aws-greengrass/aws-greengrass-nucleus/blob/87d89a61342f20e2e84f505af38bd89f68514c2f/src/main/java/com/aws/greengrass/util/platforms/unix/UnixPlatform.java#L367

Busybox based Linux use the command equivalent

"addgroup " + user + " " + group

https://busybox.net/downloads/BusyBox.html

This option also works on Debian based systems if both the user and the group are pre-existing cf. man 8 adduser

cthulhuology avatar Apr 07 '21 09:04 cthulhuology

Hi Dave, thank you for reporting this, we are looking into it and will provide an update here once fixed

shaguptashaikh avatar Apr 19 '21 16:04 shaguptashaikh