Avoiding Samba interaction

Thomas ubuntu-users-list at thomas.freit.ag
Thu Aug 13 21:39:36 UTC 2020


Hi David,

On 13.08.20 19:22, david wrote:
> I'm pretty new to Ubuntu, so this is likely a question that's been asked before.

You are probably right, however I believe this is asked in a more generic way. If I assume correctly your question is more related to the package tools, than to samba.

> 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

There are a bunch of additional options, you might need. Your milage may vary, it is best to take some time to look them up and decide if you need them or if they
may be harmful in your environment. I would tend to at least check package default configuration and not take is as it might have stuff enabled you don't want to have.

Automation is good to stay updated, however there might be changes in packages (especially configs) that need your attention (and action), for example deprecation
of options (i.e. ciphers used by SSH and SSH daemon might not start, when those are still set in config) or new options. So take care of proper logging, that you
get informed if something like this happens. Usually this will take some time (there will be warnings before breaking changes).

hth.
Thomas




More information about the ubuntu-users mailing list