Two scenarios here.
Sudo rights are given for a particular group.
a. A new user is created and is assigned to the group. b. Using this user, when we execute commands via shell script it is unable to execute any of the commands (eg., mkdir), it displays 'command not found' error. but
a. When same command is executed in an open terminal it does execute and creates directories. Any idea about the same would be greatly helpful.
Let me know if you need more information on this.