Skip to content

shelljs.exec stalls on Red Hat when script is invoked with 'sudo -u username' #72

@dduvnjak

Description

@dduvnjak

This is something that happens only on Red Hat as far as I know.
I'm running a npm module as a different user thant the one currently logged in, for example:
sudo -u username client.js

This works normally on Ubuntu and Debian, but on Red Hat it gets stuck indefinitely on this line:
response = shell.exec('whoami', { silent: true });

(it doesn't work for any command, not just whoami)

Everything works okay when the script is kicked off normaly (without sudo).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions