Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote -1 down vote accepted

-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.

share|improve this answer
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. – Daniel Völkerts Dec 5 '10 at 14:48
Oh, right. See edited answer. :) – mattdm Dec 5 '10 at 14:57
Thanks in advanced. I finally got this at google too ,) Thanks very much for the example. It helped me a lot. – Daniel Völkerts Dec 6 '10 at 8:29
That url no longer works. – lukad Aug 20 '14 at 13:34

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.