I have created few aliases, that I source to shell:
alias apti="apt-fast install -y"
alias aptr="apt-fast remove -y"
alias aptp="apt-fast purge -y"
alias apts="aptitude search"
alias aptu="sudo dpkg --configure -a; apti -f; apt-fast update; apt-fast upgrade -y; apt-fast full-upgrade -y; apt-fast autoremove -y"
and then added exceptions to /etc/sudoers:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
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
Cmnd_Alias APT=/usr/local/bin/apt
Cmnd_Alias DPKG=/usr/bin/dpkg
Cmnd_Alias APTGET=/usr/bin/apt-get
Cmnd_Alias APTITUDE=/usr/bin/aptitude
Cmnd_Alias APTFAST=/usr/sbin/apt-fast
Cmnd_Alias PM_SUSPEND=/usr/sbin/pm-suspend
myuser ALL=(ALL:ALL) NOPASSWD: APT, DPKG, APTGET, APTITUDE, PM_SUSPEND, APTFAST
and it worked fine for years. But few weeks ago (linux mint update?) it started giving me error.
$ apti iridium-browser
sudo: sorry, you are not allowed to set the following environment variables: DEBUG, LCK_FILE, DOWNLOADBEFORE, _APTMGR, APTCACHE, DLDIR, DLLIST, LISTDIR, _MAXNUM, _MAXCONPERSRV, _SPLITCON, _MINSPLITSZ, _PIECEALGO, aptfast_prefix, APT_FAST_TIMEOUT
In /etc/sudoers.d I have two files: README and mintupdate. I have not edited any of them. Only not commented lines are:
Cmnd_Alias UPDATE = /usr/lib/linuxmint/mintUpdate/checkAPT.py
ALL ALL = NOPASSWD:UPDATE
As far as I can see, I am not setting any environment variables that are lissted. What am I doing wrong?
/etc/sudoers
and files in/etc/sudoers.d
. Also tell us how apt-fast calls sudo./etc/sudoers
:Defaults env_keep="DEBUG"