package samba4 4.0.0~alpha18.dfsg1-4ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 126

Bug #992820 reported by Matt Erickson
This bug report is a duplicate of:  Bug #988509: setoption.pl is not executable. Edit Remove
48
This bug affects 10 people
Affects Status Importance Assigned to Milestone
samba4 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

derrrp

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: samba4 4.0.0~alpha18.dfsg1-4ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic i686
ApportVersion: 2.0.1-0ubuntu7
AptOrdering: samba4: Configure
Architecture: i386
Date: Tue May 1 12:37:23 2012
DpkgTerminalLog:
 Setting up samba4 (4.0.0~alpha18.dfsg1-4ubuntu2) ...
 /var/lib/dpkg/info/samba4.postinst: 14: /var/lib/dpkg/info/samba4.postinst: /usr/share/samba/setoption.pl: Permission denied
 dpkg: error processing samba4 (--configure):
  subprocess installed post-installation script returned error exit status 126
DuplicateSignature:
 Setting up samba4 (4.0.0~alpha18.dfsg1-4ubuntu2) ...
 /var/lib/dpkg/info/samba4.postinst: 14: /var/lib/dpkg/info/samba4.postinst: /usr/share/samba/setoption.pl: Permission denied
 dpkg: error processing samba4 (--configure):
  subprocess installed post-installation script returned error exit status 126
ErrorMessage: subprocess installed post-installation script returned error exit status 126
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
SourcePackage: samba4
Title: package samba4 4.0.0~alpha18.dfsg1-4ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 126
UpgradeStatus: Upgraded to precise on 2012-04-30 (1 days ago)

Revision history for this message
Matt Erickson (mutmatt) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in samba4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Julien DIDRON (julien-didron) wrote :

Hi All,

I was able to have it work after a little bit of trial and error.
I couldn't understand, after looking at the scripts, why we get this "permission denied" message.
It turns out the permissions aren't set properly:
- chmod +x /usr/share/samba/setoption.pl

It will however still fail from there on if you type "apt-get install".
Instead edit /etc/samba/smb.conf and uncomment the lines under [netlogon].
Also add the following lines underneath the [netlogon} share declaration, in order to declare [sysvol]:
[sysvol]
        path = ${SYSVOLPATH}
        read only = no

I have to say I actually set ${SYSVOLPATH} to /home/samba/sysvol in order to avoid more complaints, not sure whether that's a good idea.
I only made a brief use of Samba to transfer a few files from Windows, come to think of it I should have used ftp :o)
The system seemed stable, though I can't say that I have extensively tested it.

Cheers,
Julien

Revision history for this message
launchpadmember (lpuser1138) wrote :

Julien DIDRON:

I've changed the permissions on setoption.pl as you've described which did get rid of the original error, however the rest of your instruction produced no solution and gave a new error:

Here is what happens from the CLI:
~$ sudo dpkg --configure samba4
Setting up samba4 (4.0.0~alpha18.dfsg1-4ubuntu2) ...
Administrator password will be set randomly!
ProvisioningError: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it
dpkg: error processing samba4 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 samba4
~$

NOTE 01: The only location within the file that contains the text "[netlogon] share" was line 160, and this did not appear to be a declaration of anything. I attempted to add the declaration you gave in that section starting at line 163, and after saving the file and retrying the command given above, the same error message is produced as listed above.

NOTE 02: After removing the declaration that was added in NOTE 01 above (since it didn't seem to make a difference), I attempted to follow the error messages suggestions by removing /etc/samba/smb.conf (actually I just renamed it to something unrecognizable by the script that creates it (where the script creating /etc/samba/smb.conf appears to be /usr/share/samba/setoption.pl)), but /usr/share/samba/setoption.pl compained that it couln't write to /etc/samba/smb.conf so I created an empty file and named it smb.conf in the /etc/samba directory. Then /usr/share/samba/setoption.pl wrote two lines to that empty file:
-------- Lines written to the file begins --------
realm =
server role = dc
-------- Lines written to the file ends --------
To clarify since I started with an empty file, the above two lines are the only two lines that were written to, and are the only lines in: /etc/samba/smb.conf at this point. In the original /etc/samba/smb.conf file that was renamed to something unrecognizable by /usr/share/samba/setoption.pl these two lines are already present on lines 292 and 293 respectivly.

NOTE 03: Given the informaton from NOTE 01 and NOTE 02 above, it seems that /usr/share/samba/setoption.pl creates an error condition in /etc/samba/smb.conf by creating it with an empty "realm = " string.

Quations:
1.) Does anybody know what realm means in this case, and what should it be equal to?
2.) Does any one know how to get /usr/share/samba/setoption.pl to stop creating that empty "realm = " statement in /etc/samba/smb.conf to see if that will fix the problem? If so can you report your results here?

Also if any one else is having this problem, please remember to click on the line that is about 7 lines down from the very top of this webpage, titled
"This bug affects you and n other person"
(where "n" will be some number that represents the numbef of people who have clicked on that line). Clicking on that link helps to rate the importance of this bug report.

Thanks.

Revision history for this message
launchpadmember (lpuser1138) wrote :

Please disregaurd my previous comment.
I did not notice that this report was a duplicate of bug #988509.

Please refer to the original bug report for more information.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.