1

Where are username and password stored when you set System Wide Proxy in Settings -> Network?

I'm trying to find this file to configure an Ubuntu Server that does not have GUI.

JorgeeFG
  • 1,996

1 Answers1

1

The user-specific configuration is stored in each user's dconf registry.

You can read that configuration e.g. using gsettings:

$ gsettings list-recursively org.gnome.system.proxy

org.gnome.system.proxy use-same-proxy false
org.gnome.system.proxy mode 'none'
org.gnome.system.proxy autoconfig-url ''
org.gnome.system.proxy ignore-hosts ['localhost', '127.0.0.0/8', '::1']
org.gnome.system.proxy.ftp host ''
org.gnome.system.proxy.ftp port 0
org.gnome.system.proxy.socks host ''
org.gnome.system.proxy.socks port 0
org.gnome.system.proxy.http host ''
org.gnome.system.proxy.http port 8080
org.gnome.system.proxy.http use-authentication true
org.gnome.system.proxy.http authentication-password ''
org.gnome.system.proxy.http authentication-user ''
org.gnome.system.proxy.http enabled false
org.gnome.system.proxy.https host ''
org.gnome.system.proxy.https port 0

If you click the Apply system-wide button, it will set the proxy host values as environment variables in the /etc/environment file.

How exactly you can set a system-wide proxy is already well-described here.

Byte Commander
  • 107,489
  • Thanks, I have done grep to find where it is stored, without success. I will check later what you say. I have to say that the config is set in /etc/environment, but not in the form user:password@domain, so I was wondering where it actually stored the password, because Ubuntu detects that it requires authentication and asks for user and password, but there is no option to alter this. – JorgeeFG Jun 08 '17 at 22:07
  • Do you know how can I modify these gnome settings via scripting? Where is it located? Is it a binary file? – JorgeeFG Jun 08 '17 at 22:14
  • You can modify the user-specific dconf settings using the gsettings tool, e.g. gsettings set org.gnome.system.proxy mode 'manual'. The dconf registry itself is a binary file located in ~/.config/dconf/user, you can't directly edit it. I'll try if I can test setting a password tomorrow, but currently I don't have access to a proxy requiring authentication. – Byte Commander Jun 08 '17 at 22:28