how to automate nightly cron-apt

Asked by Pierre Frenkiel

I almost always get, with cron-apt :
   WARNING: The following packages cannot be authenticated!
    ntfs3g xxx xxx
   . . .
   Download complete and in download only mode

My command options are:
  /usr/bin/apt-get dist-upgrade -d -y -o APT::Get::Show-Upgraded=true -o APT::Get::AllowUnauthenticated=tr
I have 2 questions:
1/ how to get a package authenticated. I think all the gpg keys are downloaded, but is there a way to check that,
   and to download the missing keys?
2/ In any case, I want to force apt to actually do the upgrade, as it is not possible to run apt-get on each computer every
    morning. How to do that?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cron-apt Edit question
Assignee:
No assignee Edit question
Solved by:
Pierre Frenkiel
Solved:
Last query:
Last reply:
Revision history for this message
subliminalfix (na1tr2lp-deactivatedaccount) said :
#1

Get:1 http://security.ubuntu.com gutsy-security Release.gpg [191B]
Ign http://security.ubuntu.com gutsy-security/main Translation-en_US
Ign http://security.ubuntu.com gutsy-security/restricted Translation-en_US
Ign http://security.ubuntu.com gutsy-security/universe Translation-en_US
Ign http://security.ubuntu.com gutsy-security/multiverse Translation-en_US
Get:2 http://us.archive.ubuntu.com gutsy Release.gpg [191B]
Ign http://us.archive.ubuntu.com gutsy/main Translation-en_US
Get:3 http://security.ubuntu.com gutsy-security Release [51.2kB]
Ign http://us.archive.ubuntu.com gutsy/restricted Translation-en_US
Ign http://us.archive.ubuntu.com gutsy/universe Translation-en_US
Ign http://us.archive.ubuntu.com gutsy/multiverse Translation-en_US
Get:4 http://us.archive.ubuntu.com gutsy-updates Release.gpg [191B]
Ign http://us.archive.ubuntu.com gutsy-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com gutsy-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com gutsy-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com gutsy-updates/multiverse Translation-en_US
Get:5 http://us.archive.ubuntu.com gutsy-backports Release.gpg [191B]
Ign http://us.archive.ubuntu.com gutsy-backports/main Translation-en_US
Ign http://us.archive.ubuntu.com gutsy-backports/restricted Translation-en_US
Ign http://us.archive.ubuntu.com gutsy-backports/universe Translation-en_US
Ign http://us.archive.ubuntu.com gutsy-backports/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com gutsy Release
Get:6 http://us.archive.ubuntu.com gutsy-updates Release [58.5kB]
Get:7 http://security.ubuntu.com gutsy-security/main Packages [76.0kB]
Hit http://us.archive.ubuntu.com gutsy-backports Release
Hit http://us.archive.ubuntu.com gutsy/main Packages
Hit http://us.archive.ubuntu.com gutsy/restricted Packages
Hit http://us.archive.ubuntu.com gutsy/main Sources
Hit http://us.archive.ubuntu.com gutsy/restricted Sources
Hit http://us.archive.ubuntu.com gutsy/universe Packages
Hit http://us.archive.ubuntu.com gutsy/universe Sources
Hit http://us.archive.ubuntu.com gutsy/multiverse Packages
Hit http://us.archive.ubuntu.com gutsy/multiverse Sources
Get:8 http://security.ubuntu.com gutsy-security/restricted Packages [14B]
Get:9 http://security.ubuntu.com gutsy-security/main Sources [13.9kB]
Get:10 http://security.ubuntu.com gutsy-security/restricted Sources [14B]
Get:11 http://security.ubuntu.com gutsy-security/universe Packages [49.3kB]
Get:12 http://us.archive.ubuntu.com gutsy-updates/main Packages [246kB]
Get:13 http://security.ubuntu.com gutsy-security/universe Sources [6839B]
Get:14 http://security.ubuntu.com gutsy-security/multiverse Packages [2903B]
Get:15 http://security.ubuntu.com gutsy-security/multiverse Sources [833B]
Get:16 http://us.archive.ubuntu.com gutsy-updates/restricted Packages [4263B]
Get:17 http://us.archive.ubuntu.com gutsy-updates/main Sources [68.8kB]
Get:18 http://us.archive.ubuntu.com gutsy-updates/restricted Sources [937B]
Get:19 http://us.archive.ubuntu.com gutsy-updates/universe Packages [72.4kB]
Get:20 http://us.archive.ubuntu.com gutsy-updates/universe Sources [11.5kB]
Get:21 http://us.archive.ubuntu.com gutsy-updates/multiverse Packages [9942B]
Get:22 http://us.archive.ubuntu.com gutsy-updates/multiverse Sources [1883B]
Hit http://us.archive.ubuntu.com gutsy-backports/main Packages
Hit http://us.archive.ubuntu.com gutsy-backports/restricted Packages
Hit http://us.archive.ubuntu.com gutsy-backports/universe Packages
Hit http://us.archive.ubuntu.com gutsy-backports/multiverse Packages

what kernel gives you ths outpt

 /usr/bin/apt-get dist-upgrade -d -y -o APT::Get::Show-Upgraded=true -o APT::Get::AllowUnauthenticated=tr
peace =]

Revision history for this message
Pierre Frenkiel (pierre-frenkiel) said :
#2

thank you for your answer, but I must admit that I don't understand it

1/
   > Get:1 http://security.ubuntu.com gutsy-security Release.gpg [191B]
   > Ign http://security.ubuntu.com gutsy-security/main Translation-en_US
   > Ign http://security.ubuntu.com gutsy-security/restricted Translation-en_US
   > . . .

   I dont understand what I am supposed to do with this "apt-get update" output ?
   I run "apt-get update" from time to time, but this never changed something to the problem
   I mentionned.

2/ > what kernel gives you ths outpt
   > usr/bin/apt-get dist-upgrade -d -y -o APT::Get::Show-Upgraded=true . . .

   this is not an output, but the command actually spawned by cron-apt, as reported in
   /var/log/messages.

   My kernel is now 2.6.24-11-generic. I had to install this Hardy kernel, as after a
   normal upgrade 1 week ago I could not boot at all
     ( ALERT! /dev/disk/by-uuid/628ab9d6-5561-4b11-af94-c5d40d461cdf does not exist)

   But I had the same problem with all the previous kernels.

Revision history for this message
Pierre Frenkiel (pierre-frenkiel) said :
#3

I received no answer, but at last I found it:
  the option "APT::Get::AllowUnauthenticated=true" is not sufficient. One must also
  remove the "-d" flags, which comes as a default with cron-apt