sudoers NOPASSWD: sudo: no tty present and no askpass program specified

前端 未结 3 1251
一向
一向 2021-01-04 20:07

I have added a user like this:

$ adduser --system --home /no/home --no-create-home --group --disabled-password --disabled-login testuser

Ad

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-04 20:31

    sudo permissions are about the user/group you are changing from not the user you are changing to.

    So are those permission lines are letting the testuser user and the testgroup group run any command (as anyone) without a password.

    You need to give permission to the user running the script to run commands as the testuser user for what you want.

    Assuming that's what you meant to allow that is.

提交回复
热议问题