Samba: subprocess post-installation script returned error exit status 1

By Druss , 22 June, 2009

I made a mistake earlier today when looking for a GUI application to manage samba shares. I installed the wrong application - gadmin-samba (which is quite fugly and buggy) - instead of system-config-samba which is clean and has worked well for me in the past. gadmin-samba added all sorts of nonsense and in a bid to reset the samba configuration, I nuked the files in /etc/samba to give system-config-samba something of a fresh slate.

However, once installed, system-config-samba just failed to start. I thought that perhaps it didn't like the fact that the smb.conf was missing (which proved to be right... rather idiotic thing to fail on with no decent error message). So, I nuked samba altogether using apt and reinstalled it. Rather, I tried to reinstall it. apt/dpkg spat the following error at me during the configuration:

Generating /etc/default/samba...
* Starting Samba daemons [fail]
invoke-rc.d: initscript samba, action "start" failed.
dpkg: error processing samba (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

A full remove and purge failed to fix it, which was rather frustrating. So, in a last ditch attempt, I created a blank smb.conf in /etc/samba and then purged and reinstalled samba. It went off without a hitch and system-config-samba also works fine now.

It's rather silly, if you ask me, to have the entire reinstallation die a cryptic death because of a missing configuration file.

All times are UTC. All content licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.