Skip to content

Instantly share code, notes, and snippets.

@simryang
Last active January 22, 2021 02:59
Show Gist options
  • Save simryang/d3176821404d19f8326623c13ec67d99 to your computer and use it in GitHub Desktop.
Save simryang/d3176821404d19f8326623c13ec67d99 to your computer and use it in GitHub Desktop.
Add /etc/sudoers.d/97-ssh-service.conf file to start ssh service with sudo privilege on windows 10 startup
echo "%sudo ALL=NOPASSWD: /usr/sbin/service" | sudo tee /etc/sudoers.d/97-ssh-service
sudo chmod 0440 /etc/sudoers.d/97-ssh-service
@simryang
Copy link
Author

Target file should not contain '.' or '~' in its name.
user(or group, %) HOST=(target_user:target_group){=NOPASSWD}: command(or ALL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment