Apt update warnings

Operating system:Ubuntu
OS version:20.4
Since installation of Virtualmin I see this:

Usage of apt_auth.conf(5) should be preferred over embedding login information directly in the sources.list(5) entry for ‘http://software.virtualmin.com/vm/6/apt
N: Usage of apt_auth.conf(5) should be preferred over embedding login information directly in the sources.list(5) entry for ‘http://software.virtualmin.com/vm/6/apt

How to change virtualmin apt source list to get rid of this warnings?
Thank you

Hi,

Thanks, we’ll fix this in the future.

Meanwhile, you can manually :

  1. Edit /etc/apt/sources.list.d/virtualmin.list and remove your login and password information from it
  2. Create a new /etc/apt/auth.conf.d/virtualmin.conf file and place in it:
     machine software.virtualmin.com login 0000000 password YourPassword

@Jamie - should we fix this as part of config check, as it’s fairly easy?

Seems like we could use this new config file in the Virtualmin install process. Only question is how widely supported it is…

Quite many - Debian 10, Ubuntu 18-20.

@Ilia , thank you very much for your answer.
I will try your solution later tonight and I will get back here with a result…

Best regards
Marko

@Ilia I am not sure how to correctly create new file “virtualmin.conf”. Can you please help me out.
You wrote that in this file there should be:

machine software.virtualmin.com login 0000000 password YourPassword

my qustions are:

  1. machine ? is this just a word as you wrote or do I need to change it with something else
  2. login ? do I just leave the word login as is or?
  3. 0000000 ? - is this my virtualmin software licence number?
  4. password ? same qustion, do I just leave the word as you wrote?
  5. YourPassword ? is this my License key for Virtualmin software or?

Thank you for your help.

I have figured it out using ‘man apt_auth.conf’ but somehow it is not working. I am getting error IP not authorized . So there is still something what I’m missing but I don’t know what…

It’s because the transfer protocol should be set as https and not http on /etc/apt/sources.list.d/virtualmin.list file, like this :

Ubuntu 20.04 repos:

deb https://software.virtualmin.com/vm/6/apt virtualmin-focal main
deb https://software.virtualmin.com/vm/6/apt virtualmin-universal main

Dear @Ilia

This is what I have now:
in a file:
/etc/apt/auth.conf.d/virtualmin.conf

machine deb https://software.virtualmin.com/vm/6/apt virtualmin-focal main login XXXXXXX password MyPassword
machine deb https://software.virtualmin.com/vm/6/apt virtualmin-universal main login XXXXXXX password MyPassword

where XXXXXXX above are my virtualmin licence serial number and for “MyPassword” I wrote my Virtalmin License key (I hope this is correct settings?)

and in a file:
/etc/apt/sources.list.d/virtualmin.list I have:

deb https://software.virtualmin.com/vm/6/apt virtualmin-focal main
deb https://software.virtualmin.com/vm/6/apt virtualmin-universal main

But I still get error when using apt update:

Err:16 https://software.virtualmin.com/vm/6/apt virtualmin-focal InRelease
401 Unauthorized [IP: 163.172.162.254 443]
Err:17 https://software.virtualmin.com/vm/6/apt virtualmin-universal InRelease
401 Unauthorized [IP: 163.172.162.254 443]
Reading package lists… Done
E: Failed to fetch https://software.virtualmin.com/vm/6/apt/dists/virtualmin-focal/InRelease 401 Unauthorized [IP: 163.172.162.254 443]
E: The repository ‘https://software.virtualmin.com/vm/6/apt virtualmin-focal InRelease’ is no longer signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://software.virtualmin.com/vm/6/apt/dists/virtualmin-universal/InRelease 401 Unauthorized [IP: 163.172.162.254 443]
E: The repository ‘https://software.virtualmin.com/vm/6/apt virtualmin-universal InRelease’ is no longer signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I don’t know what is that I am doing wrong.

Please advise.

Best regards
Marko

Try for /etc/apt/auth.conf.d/virtualmin.conf :

machine software.virtualmin.com login MyLogin password MyPassword

Hello dear @Ilia
Thank you very much to try to help me but I have to inform you that I tried your last suggestion and I got same error message as I posted above.
So, I am sorry but no success with settings as you wrote.

Try for /etc/apt/auth.conf.d/virtualmin.conf :
machine software.virtualmin.com login MyLogin password MyPassword

(using Serial number for MyLogin and and License key for MyPassword)

I am trying all sorts of setting this up but no success.
Do you have any more suggestions?

Kind regards
Marko

What is the output of :

cat /etc/apt/auth.conf.d/virtualmin.conf

… and

cat /etc/apt/sources.list.d/virtualmin.list

Don’t post user/password, though! Sanitize that output before posting.

1 Like

Hello @Ilia & @Joe

Here is the output of cat:

cat /etc/apt/auth.conf.d/virtualmin.conf
machine software.virtualmin.com login XXXXXX password MyPassword
machine software.virtualmin.com login XXXXXX password MyPassword

and the other one:

cat /etc/apt/sources.list.d/virtualmin.list
deb https://software.virtualmin.com/vm/6/apt virtualmin-focal main
deb https://software.virtualmin.com/vm/6/apt virtualmin-universal main

and the error ehen running “apt update” :

Err:16 https://software.virtualmin.com/vm/6/apt virtualmin-focal InRelease
401 Unauthorized [IP: 163.172.162.254 443]
Err:17 https://software.virtualmin.com/vm/6/apt virtualmin-universal InRelease
401 Unauthorized [IP: 163.172.162.254 443]
Reading package lists… Done
E: Failed to fetch https://software.virtualmin.com/vm/6/apt/dists/virtualmin-focal/InRelease 401 Unauthorized [IP: 163.172.162.254 443]
E: The repository ‘https://software.virtualmin.com/vm/6/apt virtualmin-focal InRelease’ is no longer signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://software.virtualmin.com/vm/6/apt/dists/virtualmin-universal/InRelease 401 Unauthorized [IP: 163.172.162.254 443]
E: The repository ‘https://software.virtualmin.com/vm/6/apt virtualmin-universal InRelease’ is no longer signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Unauthorized [IP: 163.172.162.254 443]

Double check that serial and license entered correctly.

It works for me.

Try running:

apt-get clean
apt-get autoclean

Dear @Ilia

I am so sorry about problems I caused. I double checked the credential as you mentioned and I found errata in password.

I sincerely apologize for the inconvenience.
Now ‘app update’ works without problem.
Kind regards
Marko

No problem, Marko! Have a good day!