localectl updates /etc/default/locale without root privileges

Asked by Christian S.

/etc/default/locale is write restricted to user and group root:
$ ls -l /etc/default/locale
-rw-r--r-- 1 root root 17 Oct 26 12:46 /etc/default/locale

My account is neither root nor in group root:
$ groups
christian adm cdrom sudo dip plugdev lpadmin sambashare

To my surprise I can successfully edit /etc/default/locale via localectl as non-root in Ubuntu 18.10:
$ localectl set-locale LANG=en_US.UTF-8

Is this a bug or not?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

ls -al `which localectl`

Thanks

Revision history for this message
Christian S. (christian-stein2) said :
#2

$ ls -al `which localectl`
-rwxr-xr-x 1 root root 21916 Oct 4 16:58 /usr/bin/localectl

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

I'm not sure but I think localectl updates the confirmation for your user in it's $HOME

If it is updating the file you say then I suggest you report a bug

Can you help with this problem?

Provide an answer of your own, or ask Christian S. for more information if necessary.

To post a message you must log in.