assuming we just want a group that has the same name as the user you can simplify this by just creating edxapp_sandbox_user and leaving out the creation of the edxapp_sandbox_group since by default adduser will create a group with the same name and associate it with the user.