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

前端 未结 3 1257
一向
一向 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:25

    I fixed it by login to the server and append the following lines to the ssh-server configuration:

    > vim /etc/ssh/sshd_config
    
    Match User 
        PermitTTY yes
    

    So I don't need the -t options permanently.

提交回复
热议问题