Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 deleted 329 characters in body
source | link

status command does not require superuser rights, it works w/o sudo too. start and stop do require sudo. Visudo configuration you showed impliesYou can avoid entering password but not specifying full path. Since you try it w/o full path, it considered unknown for sudo config hence tries to request password for what TTY is required. Consider two options:

1 Use full path /bin/systemctl for controlling service with start and stop

2 Reconfigure sudo for the user to accept just systemctl * myservice.service command

status command does not require superuser rights, it works w/o sudo too. start and stop do require sudo. Visudo configuration you showed implies specifying full path. Since you try it w/o full path, it considered unknown for sudo config hence tries to request password for what TTY is required. Consider two options:

1 Use full path /bin/systemctl for controlling service with start and stop

2 Reconfigure sudo for the user to accept just systemctl * myservice.service command

status command does not require superuser rights, it works w/o sudo too. start and stop do require sudo. You can avoid entering password but not specifying sudo.

1
source | link

status command does not require superuser rights, it works w/o sudo too. start and stop do require sudo. Visudo configuration you showed implies specifying full path. Since you try it w/o full path, it considered unknown for sudo config hence tries to request password for what TTY is required. Consider two options:

1 Use full path /bin/systemctl for controlling service with start and stop

2 Reconfigure sudo for the user to accept just systemctl * myservice.service command