PDA

View Full Version : [all variants] Install Updates with no Password



joseph1975
January 5th, 2009, 03:27 AM
I am using Ubuntu 8.10. Is there a way for Ubuntu to automatically install security and recommended updates without having to type in the root password. What I'm looking for is a way the computer will check for updates once a day (I've already figured that part out), but will install the updates, rather then just tell me they exist.

Thanks for your help,
Mark

pytheas22
January 5th, 2009, 04:07 AM
You could write a cronjob for root to run the command:


sudo apt-get upgrade

I'm pretty sure this would work; I know it works on Ubuntu 6.06 because I used to use it to keep a server updated without manual intervention.

You could probably pass more options to apt-get to tell it to install only important upgrades, if you don't want it to install everything.

If you don't know how to write a cronjob I can give instructions, but it should also be easy enough to figure out with some quick googling. Make sure you add the cronjob to root's crontab or it won't work.

Dave_Connor
January 5th, 2009, 05:12 AM
You can edit /etc/crontab and enter the command and what user (root in this case) you want the command and when to run the command.

bodhi.zazen
January 5th, 2009, 06:24 AM
You could write a cronjob for root to run the command:


sudo apt-get upgradeI'm pretty sure this would work; I know it works on Ubuntu 6.06 because I used to use it to keep a server updated without manual intervention.

You could probably pass more options to apt-get to tell it to install only important upgrades, if you don't want it to install everything.

If you don't know how to write a cronjob I can give instructions, but it should also be easy enough to figure out with some quick googling. Make sure you add the cronjob to root's crontab or it won't work.

If you are running a cron task as root, sudo is not needed.

IMO you should :

apt-get update && apt-get dist-upgrade

use the full path in cron jobs ...

You can also configure Synaptic ..

Go into the Repositories tab -> Updates

Under automatic updates check off "Install security updates without confirmation"

IMO you should review non-security updates before you update.

joseph1975
January 5th, 2009, 01:08 PM
Thank you everyone for your replies. They were very helpful.