[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sudo not respecting /etc/sudoers



Le quartidi 14 floréal, an CCXXIII, Jonathan Dowland a écrit :
> There's nothing wrong with the file permissions. By default, root's
> shell reads /etc/environment, but users do not. To be honest I'm not
> sure why that is the case.

I believe you are wrong.

> You can configure your user(s) to source /etc/environment by adding '.
> /etc/environment' to their ~/.bashrc files (assuming they still use bash).

This is bugware. /etc/environment is read by PAM. If it is not, then the PAM
configuration is faulty. As far as I can see, pam_env.so is invoked by each
specific PAM configuration; IMHO, it should be in common-session.

> To solve your specific apt-related problem, you can also add 'Defaults
> env_file += /etc/environment' to sudoers and it will be sourced by sudo
> when you use it to invoke another command.

This is bugware.

> (IMHO that's preferable to whitelisting the http_proxy env variable).

It may be the case if sudo was used to grant LIMITED access to the user.
When granting UNLIMITED access, whitelisting the environment variable is
preferable.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature


Reply to: