Avoiding Samba interaction
Tom H
tomh0665 at gmail.com
Fri Aug 14 09:55:44 UTC 2020
On Thu, Aug 13, 2020 at 11:41 PM Thomas
<ubuntu-users-list at thomas.freit.ag> wrote:
> On 13.08.20 19:22, david wrote:
>>
>> I have installed Samba, and tailored the configuration to my choices.
>> When running an "apt-get update", Samba was updated. I was then
>> faced with a conversational interaction that I already knew about,
>> and I really want to avoid it. I have performed this identical
>> update on other machines, and my automated updates are not equipped
>> for conversation.
>>
>> Is there a way to say "do not ask me, just leave my file alone, and
>> put the new file somewhere, like <filename>.new
>
> Yes, there is one, keyword to look after (in man pages or when
> googling) is "non-interactive" depending on what tool you use exact
> answer might differ a bit but that is a good approach to search for
> specific help.
>
> I assume you are using apt-get, then something like this might help:
>
> DEBIAN_FRONTEND=noninteractive \ <- this is
> for dpkg subsystem not to ask anything
> apt-get \
> -o Dpkg::Options::=--force-confold \ <- stick to
> existing config, even if package config changed
> --assume-yes \ <- answer yes
> to anything that would not break stuff seriously (there are options
> to do that as well) upgrade
You need to add "--force-confdef" for dpkg to overwrite configuration
files that haven't been modified.
Rather than pass these options at the command-line, create an apt config file
$ cat /etc/apt/apt.conf.d/dpkg-options
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
There's also the ucf mechanism. You can force "confold" with
"conf_force_conffold=YES" in "/etc/ucf.conf".
After an upgrade, check "/etc" for files ending in "dpkg-dist",
"ucf-dist", and "ucf-new" to check whether you need to update your
configuration.
More information about the ubuntu-users
mailing list