[Tfug] Ubuntu noninteractive aptitude mysql install

Chad Woolley thewoolleyman at gmail.com
Thu Oct 1 09:46:00 MST 2009


This isn't a sudo problem (I already have sudoers NOPASSWD set
globally for this user to avoid that).

This is an interactive prompt that is part of the mysql server
aptitude install script, which is prompting for the *MySQL* database
root user password.  Until recently, it just defaulted to no password,
but looks like the packager got security happy.

Look at the link I sent - supposedly the "Flags: seen" hack in
/var/cache/debconf/passwords.dat is the correct way to address this,
but it never works when I run it from my automated script the first
time, but always works when I do it manually.

On Thu, Oct 1, 2009 at 7:29 AM, Terence Rudkin <trudkin at gmail.com> wrote:
> do
> $> sudo visudo
>
> then add at bottom of  the file
> chad ALL=NOPASSWD: /usr/bin/apt-get
>
> exit wit :wq
>
> chad is the user that will be running apt-get
>
> Now any new logins will be able to use apt-get with
>     $> sudo apt-get
> with no prompts for root password
>
>
>
> On Thu, Oct 1, 2009 at 12:16 AM, Chad Woolley <thewoolleyman at gmail.com>
> wrote:
>>
>> Haven't followed this list in a while, but maybe you guys can help me.
>>
>> When scripting an aptitude install of mysql on ubuntu, how can I avoid
>> blocking at aptitude's interactive root password prompt?
>>
>> I tried this, but it doesn't work on when I run it on a clean EC2 image:
>>
>>
>> http://github.com/thewoolleyman/rails/blob/master/ci/setup_rails_dependencies.rb#L26
>>
>> Maddeningly, it works fine when I immediately do the same thing again.
>>
>> Thanks,
>> -- Chad
>>
>> _______________________________________________
>> Tucson Free Unix Group - tfug at tfug.org
>> Subscription Options:
>> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>
>




More information about the tfug mailing list