i run like this:
prod:~$ sudo visudo
and then i added myusername here
# User privilege specification root ALL=(ALL:ALL) ALL foobar ALL=(ALL:ALL) NOPASSWD:ALL
i tried this also:
sudo sh -c 'echo "foobar ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-foobar'
then i tried to run
apt-get update got this:
Reading package lists... Done E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
i want to run any commands without sudo , not only apt-get update/upgrade but all , i have look some questions and answers on google, and do it but still doesn't work
how to solve this ??