1

On linux, in order to run a process under a different group, you can use the sg command. For example,

sg <groupname> -c 'id -g'

prints out the group id of the group name "groupname". Note that newgrp can not be used in shell scripts to achieve this.

Is there an equivalent command for solaris? Does the solution also work on my solaris 5.8?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.