Comment 12 for bug 223502

Revision history for this message
Massimiliano Ballerini (mballerini) wrote :

It seems the values for these variables are user based.

Then if you run the command "gconftool --get /system/http_proxy/use_http_proxy" with a user that is not the proper one, you get that error.

In /etc/cron.daily/apt you have:
admin_user=$(getent group admin|cut -d: -f4|cut -d, -f1)
and:
use=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/use_http_proxy)

This mean the script uses the first user in the group admin, that in this case is my login user.

I added the root user in the group admin, look like it's fixed now. Had to check also if variables were set for user root though, they usually are.
Don't know why a cron job (running as root), would sudo quering the conf table of the the first admin user for the info on the proxy. Looks like a workaround or something unclean, even more for a server install.

This procedure is used also in other cron scripts.