Cannot create Admin account
  • I created a Booktype server today and all went fairly well until at the end of the install I received
    CommandError: Could not create the user.

    Booktype did allow me to create a regular user/member thru the WebUI.

    I jumped on the forum and saw a posting by Sharan Foga on July 10. My symptons are identical. I read the solution by Daniel James.
    but "no joy"..

    I went to the /var/lib/booktype folder and ran "source bin/activate". My command prompt changed to (booktype)user@hostname
    I path my way to the "instance1" directory and ran "sudo ./manage.py createsuperuser" and received the same msg:

    Traceback (most recent call last):
    File " ./manage.py", line 5 in <module>
    from unipath import Path
    ImportError No module named unipath

    What am I missing doing wrong? I follow the suggested steps...

    Thanks in advance
    Milt

  • 4 Comments sorted by
  • This discussion is closed. I figured out what was wrong. The administrator account was created inspite of the msg at the end of the install. I got confused about the "acct" name versus the "full name"

    In my original post I stated that I was able to register a new user but the admin acct did not appear to be working. While logged in to the new acct and getting familiar with the book creation tools. I click on the settings gear and scrolled down to "roles". While in Roles I clicked "Assign Roles" and POOF! there were 2 accts, the admin and the new user acct I created.

    I logged out and logged in with the admin acct. All's good. Newbie growing pains!
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Milton, good to hear that you got this working! Please provide details of your installation so we can figure out why you got the error:
    CommandError: Could not create the user.

    For example, which server platform you are using, and whether you installed from git, tarball or deb package.

    Thanks!

    Daniel
  • Hi Daniel

    I installed on a virtualbox vm ubuntu 14.04 using the auto-install method deb package:
    sudo apt-get install booktype  The install was flawless. I kept detailed notes of each step and did not notice a single error until the install end. Even then I guess it is a false-positive.

    I used the sourcefabric manual Booktype 2.0 install instructions to the letter. I outputted some sysinfo for you in the attached file "sysinfo.04-09-2016.log".

    1. Is there a details guide somewhere explaining what to back-up and where? I looked in the "instance1" folder /books and /data and elsewhere. Though I have a book started with a couple of charters I do not see any data related to my book.

    2. Are there any hardening guidelines of the server to make it more secure when having authors connect over the Net? I work in data security and always thinking about things like buffer over-runs and input validation..etc  I'm think of connecting this server to my VPN server and having select contributors access the platform that way? Please advise.

    3. While editing my chapters I noticed I only have Fonts (serif and sans serif) is that normal?

    So far, so good! I'll post findings and such as I get more savy with booktype.
    Thanks,
    Milt
    Post edited by Milton at 2016-09-04 22:29:45
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Milt,

    1. Generally, you should back up the whole instance directory in /var/www/booktype or similar, whichever directories you are serving with Apache, as well as your database (please see https://github.com/sourcefabric/Booktype/blob/master/scripts/cron_backup.sh.original as a starting point for database backups). If your book only contains text, you may not see any files in data/books/<bookname>/<version>/ as that is where images are stored.

    2. For hardening, any guide to securing Django applications would be useful. You should probably serve the instance over https for a start. See the tip on TLS for Ubuntu 14.04 at the end of http://sourcefabric.booktype.pro/booktype-21-for-authors-and-publishers/manual-installation-on-gnulinux/

    3. If you only have the choice of serif or san-serif fonts, it means you are using the Custom theme. For more choice in themes, I recommend upgrading to Booktype version 2.1. A deb package of Booktype 2.1 for Debian and Ubuntu should be available soon.

    Cheers!

    Daniel