I have added my user in sudoers file, after a restart ubuntu still requires password to execute command.
Below is my sudoers file.
root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d aman ALL=(ALL:ALL) ALL
Here "aman" is current loggedin user name.
Actually in my ubuntu 16.04 I am facing wifi issue which I am able to resolve using below command but I want to execute this command on startup without prompting for password.
systemctl restart network-manager.serviceroot
I have also tried below command but no sucess, every time I am going to execute command ubuntu prompt me to enter password.
usermod -aG sudo username
UPDATE :- Now below is my sudoers file screen shot
Note:- When I execute whoami command terminal shows "aman"