5 .. Copyright (c) 2020 mudpy authors. Permission to use, copy,
6 modify, and distribute this software is granted under terms
7 provided in the LICENSE file distributed with this software.
9 This guide provides basic management, configuration and
10 troubleshooting tips for mudpy administrators.
17 Either create an account named *admin* or modify the main
18 configuration file (for example, :file:`etc/mudpy.yaml`) and change
19 the ``.mudpy.limit.admins`` list to include the name of your initial
20 admin user. Once you have at least one administrative user, that
21 user can so something like :command:`set account.someuser
22 administrator True` to elevate another account's access. It's
23 probably best to empty or remove the ``.mudpy.limit.admins list``
24 from the configuration before making the service publicly
27 While the service isn't running you can also edit the accounts.yaml
28 file (probably :file:`data/accounts.yaml` unless you've changed the
29 default data path) and add a line like
30 ``account.someuser.administrator: true`` for any already existing
31 account in that file. In future, a separate system command-line
32 utility may be provided to make pre-seeding administrator accounts
33 possible at time of installation so that the service doesn't need to
34 be started with an initially insecure configuration.
39 Once you've created and awakened an avatar for an an
40 :ref:`administrator <admin-accounts>`, you can use the interactive
41 command-line interface to create or destroy elements and set or
42 delete facets on them. A set of sample elements are available in the
43 source tree and included by default from the sample configuration
44 file (specified in its ``_load`` list). You can also just edit those
45 files with a text editor or create a new directory with your own
46 YAML file in it to load instead.
48 See the built-in :command:`help` as an administrator for the
49 :command:`create`, :command:`destroy`, :command:`set` and
50 :command:`delete` commands. For example, you can set an arbitrary
51 value on a facet of any element like::
53 set account.someuser myperm True
55 This would add or update a *myperm* facet to the account element for
56 the *someuser* user to have the value *True*.
61 The administrative :command:`show` command provides a number of
62 useful inspection tools. Here's an example testing with the
63 :command:`show result` subcommand from an active session with a
64 couple of avatars awake, comparing with the output from related
65 :command:`show group` and :command:`show element` invocations::
69 These are the elements in the "actor" group:
74 > show result actor.universe.groups['actor'].keys()
76 dict_keys(['avatar_admin_0', 'avatar_luser0_0'])
78 > show element actor.avatar_luser0_0
80 These are the properties of the "actor.avatar_luser0_0" element (in
81 "/home/fungi/src/mudpy.org/mudpy/data/actor.yaml"):
84 inherit: ['archetype.avatar', 'archetype.actor']
88 > show result actor.universe.contents['actor.avatar_luser0_0'].get('name')
92 Note that for safety the :command:`show result` executes within the context of
93 a command handler with only Python's :code:`__builtins__`, the :code:`mudpy`
94 library package, and the active :code:`universe` available.