Hi,
I don't know if you've had time to look at bug #515675
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515675> [n| | ]
[dokuwiki
<http://bugs.debian.org/cgi-bin/pkgreport.cgi?package=dokuwiki>]
dokuwiki : installation prevents access to config manager / admin area
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515675>
It was bugging me so I tried if I could get the workaround I described
in the bug report included into the postinst script.
This was the first time I had to deal with debconf, so I'm not sure
everything works the way it should, and I don't have a test environment
readily available. The script seems to run and does the appropriate
prompts for input, but I can't check that all values end up in the
intended files as I can't test it in a real install.
The relevant diffs are attached.
HTH
Koen.
77,104d76
< return "adminname";
< }
< }
<
< sub adminname
< {
< title("Create an Administrator account");
< input("high", "dokuwiki/system/adminname");
< my @ret = go();
< if ($ret[0] == 30) {
< return undef;
< }
< @ret = get("dokuwiki/system/adminname");
< if ($ret[1] ne "" ) {
< return "adminpassword";
< } else {
< return "purgepages";
< }
< }
<
< sub adminpassword
< {
< title("Administrator password");
< input("critical", "dokuwiki/system/adminpassword");
< my @ret = go();
< if ($ret[0] == 30) {
< return undef;
< } else {
66,100d65
<
< ## kn 20090308 - set an admin account to be able to manage acl
< db_get dokuwiki/system/adminname
< if [ "$RET" != "" ]; then #user wants to set up admin account for ACL
< #FIXME is this useful ? we do sort of the same in 'config'
<
< ADMIN=$RET
<
< #create a local.php
< if [ ! -e /etc/dokuwiki/local.php ]; then
< localconf=$(tempfile)
< (echo "<?php"
< echo "/*"
< echo "Simply copy the options you want to change from dokuwiki.php to this file and change them"
< echo "*/"
< )>$localconf
<
< #add requirement statements for admin access and acl
< (echo "\$conf['useacl'] = true ;"
< echo "\$conf['superuser'] = '@admin' ;"
< ) >>$localconf
<
< ucf $localconf /etc/docuwiki/local.php
< fi
<
< # setup an admin account !! depends on 'mkpasswd' !!
< db_get dokuwiki/system/adminpassword
<
< ADMINPASS=$(mkpasswd --hash=md5 $RET)
< echo "${ADMIN}:${ADMINPASS}:${ADMIN}:f...@example.com:admin" >> $usersauth
<
< #FIXME: need to remove passwd from /var/cache/debconf/passwords.dat
< fi
< ## kn end
<
105d69
< rm $localconf;
279,296d278
<
<
< Template: dokuwiki/system/adminname
< Type: string
< Description:Wiki Administrator Account:
< To use Access Control Lists with dokuwiki (i.e. manage users and read/write access),
< you need to create an administrator account, which will allow you to log in as
< administrator, create user accounts and set up access control lists.
< .
< Leave this blank if you don't want to create an administrator account.
< Default: admin
<
< Template: dokuwiki/system/adminpassword
< Type: password
< Description:Wiki Administrator password:
< set a password for the wiki administrator account
< Default:
<