2

I wrote a BASH script for doing an unattendend install on an ARM based Debian system. One of the packages being installed is samba.

I added

apt-get -y install samba

into my setup routine, but apt-get hangs due an ncurse configuration window for Samba workgroup.

How can I pass such windows? My script download the right smb.conf etc. after apt-get installed the packages.

3 Answers 3

-1

-y or --assume-yes really should do it. Apparently not. :)

I think the thing to do is to put the answer in to the debconf database before installing the package. Then it'll already know the answer and shouldn't prompt. There's an example of doing that here.

4
  • Hello, the problem is that is not an apt-get question like 'Install samba (needs more xx MB on disc)'. It's a special 'task' which runs due an apt-get install samba command. This command displays an GUI using ncurses and ask for (in this case) a workgroups name. It seemed I can't supress this dialog using the -y option. Dec 5, 2010 at 14:48
  • Oh, right. See edited answer. :)
    – mattdm
    Dec 5, 2010 at 14:57
  • Thanks in advanced. I finally got this at google too ,) Thanks very much for the example. It helped me a lot. Dec 6, 2010 at 8:29
  • 2
    That url no longer works.
    – lukad
    Aug 20, 2014 at 13:34
0

What you need should be described in man 7 debconf in the section Priorities. Another way is described in the Frontend section (noninteractive)

2
  • No manual entry for debconf in section 7 Jul 11, 2022 at 7:21
  • @PhilippLudwig Yes, there is. At least on Debian 10.
    – vidarlo
    Jul 11, 2022 at 7:36
0

Set the environment variable DEBIAN_FRONTEND to noninteractive, e.g.:

sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y samba

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .