View Issue Details

IDProjectCategoryView StatusLast Update
0002290SOGoPackaging (Debian)public2013-05-24 19:25
Reportervkersten Assigned Tojraby 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Target Version2.0.6Fixed in Version2.0.6 
Summary0002290: sogo_2.0.5-1_amd64.deb does not install on lenny
Description

The useradd command in the installer is wrong (preinst script)
It says:
useradd -d /var/lib/sogo -g sogo -c "SOGo daemon" -s /usr/sbin/nologin -M -r sogo

It should read:
useradd -d /var/lib/sogo -g sogo -c "SOGo daemon" -s /usr/sbin/nologin -m -r sogo

-M is not a valid option in useradd.

quick fix is to create the above user (and the group) and then install the package until a new version is created.

TagsNo tags attached.

Activities

jraby

jraby

2013-04-16 13:19

viewer   ~0005527

The -M option is invalid on older releases of Debian, but all supported releases have this option.
Also, -m is to avoid creating the home directory, whereas -M creates it.

Since lenny support has been dropped by Debian more than a year ago, I would rather not add conditions to the preinst script to workaround its shortcomings.

vkersten

vkersten

2013-04-16 15:31

reporter   ~0005528

Hi Jraby, I think you got -m and -M confused.

   -m, --create-home
       Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory
       (which can be defined with the -k option) will be copied to the home directory.

       By default, if this option is not specified and CREATE_HOME is not enabled, no home directories are created.

   -M
       Do no create the user's home directory, even if the system wide setting from /etc/login.defs (CREATE_HOME) is set to yes.

You might want to consider using --long options, because:
It works on all distros.
It is more clear.
It resolves this bug :)

jraby

jraby

2013-04-16 15:56

viewer   ~0005529

Indeed, I mistyped that sentence:
<pre>
Also, -M is to avoid creating the home directory, whereas -m creates it.
</pre>

The thing is, we don't want files from the skeleton directory in the sogo user home. That's why the homedir is not created by useradd (-M) regardless of system settings.

I guess we could remove the -M switch since the homedir won't be created anyway when specifying -r (--system)

vkersten

vkersten

2013-04-17 04:46

reporter   ~0005533

great!

ludovic

ludovic

2013-05-24 11:49

administrator   ~0005611

Jean, has this been done?

jraby

jraby

2013-05-24 19:04

viewer   ~0005613

Fixed : https://github.com/inverse-inc/sogo/commit/82253e91d2e8f0410625e11a03737883ea9f1d60

Issue History

Date Modified Username Field Change
2013-04-16 09:14 vkersten New Issue
2013-04-16 13:19 jraby Note Added: 0005527
2013-04-16 15:31 vkersten Note Added: 0005528
2013-04-16 15:56 jraby Note Added: 0005529
2013-04-17 04:46 vkersten Note Added: 0005533
2013-05-24 11:49 ludovic Note Added: 0005611
2013-05-24 19:04 jraby Note Added: 0005613
2013-05-24 19:04 jraby Assigned To => jraby
2013-05-24 19:04 jraby Status new => resolved
2013-05-24 19:04 jraby Resolution open => fixed
2013-05-24 19:25 ludovic Fixed in Version => 2.0.6
2013-05-24 19:25 ludovic Target Version => 2.0.6