Licornd is now fully interactive
You can debug licornd in a live interactive session. Just start it in the foreground (licornd -D), and press 'i' . You can access every object and do whatever you want (trigger a method, dump an object, really whatever the python language allows you ; so be carefull, you're root...).
Bonus: everything is auto-completed with <TAB>, like any interactive shell can be, and your command history is saved to ~/.licorn/licornd_history (thanks to readline).
Press Control-D when you are done to leave interactive mode and return to standard command mode.
The interactive session is implemented in a separate thread. The licorn daemon stays fully functionnal during it. Stopping and restarting individual things manually will probably come in the near future, but as of now if your display gets corrupted with other daemon output, just hit Control-L to clear your screen.
Example session:
olive@desktop-001 ~/licorn @ licornd -D
* [2010/04/12 01:01:44.8412] licornd/master@server(5124): starting all threads.
* [2010/04/12 01:01:44.8454] licornd/wmi(5129): started, waiting for master to become ready.
* [2010/04/12 01:01:44.9980] licornd/master@server(5124): all threads started, going to sleep waiting for signals.
* [2010/04/12 01:01:45.4224] licornd/wmi(5129): ready to answer requests at address http://localhost:3356/.
* [2010/04/12 01:01:47.6714] Entering interactive mode. Welcome into licornd's arcanes…
Licorn® @DEVEL@, Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5] on linux2
licornd> LMC.users.keys()
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 33, 34, 38, 39, 41, 300, 113, 100, 101, 102, 103, 1000, 105, 106, 107, 108, 109, 110, 111, 112, 104, 114, 115, 116, 117, 65534]
licornd> dqueues
{'pyrosys': <Queue.Queue instance at 0x9c7a18c>, 'reverse_dns': <Queue.Queue instance at 0x9c7a04c>, 'arppings': <Queue.Queue instance at 0x9c71eec>, 'pings': <Queue.Queue instance at 0x9c71dac>}
licornd>
* [2010/04/12 01:02:24.0383] Leaving interactive mode. Welcome back to Real World™.
* [2010/04/12 01:02:25.3743] licornd/master@server: signal 2 received, shutting down…
* [2010/04/12 01:02:25.3748] licornd/wmi: signal 15 received, shutting down…
* [2010/04/12 01:02:25.3751] licornd/wmi: exiting.
* [2010/04/12 01:02:25.5468] licornd/master@server: exiting (up 40 secs).
PS: i really love Python. These kind of things are just amazing.
PS2: the implementation can be incomplete, I didn't really test every object. Just report any bug you find and I will fix it ASAP.
You can now change your password with Licorn® CLI
Just run mod user -C and you're done.
root can change any user's password.
Any user (member of admins group) can try to change any other user's password, but must know the current one...
A standard user can't change his/her password yet (this needs a full rewrite of the security model), but this will come in the near future.
Daemon status available
In my last patch I added the availability to query daemon status, in two ways:
- the get status command, which can be called with argument --full. This command is complemented by get users --dump, get groups --dump and so on, which help debugging daemon internal data structures without stopping it. This method for getting the daemon status is independent from its state (forked into background or not).
- when the daemon is attached to the terminal (launched with -D), you can now type uni-letters commands to query it:
- 'f' or 'l' will toggle between normal and full status.
- [Enter] will just display a newline (usefull for manually marking spaces between different operations.
- Ctrl-L will clear the screen, like in a normal terminal.
- Ctrl-T will display the current status of the daemon (full status depends on wether you activated it before or not, beiing disabled by default and remembered across the daemon session when you set it, until terminate or restart).
- Ctrl-Y (or space) will do the same, but will clear the same first. Typing repeatedly on space will emulate a top-like behaviour, permitting to monitor the daemon status, even if it is very active.
- Ctrl-R will reload the daemon (by sending it an USR1 signal). Very useful when you modified daemon or core code, just hit R in your daemon terminal and you're done with the new code reloaded.
- Ctrl-C will break and terminate, as expected.
- Ctrl-U will terminate the daemon with a traditionnal signal 15 (similating a normal kill or killall).
- (Caution) Ctrl-K will send a real KILL signal, when the daemon is stuck.
In some rare cases (when the interactor thread is crashed, which never happens ;-) ), you will not be able to use these commands and will need to operate "à l'ancienne" (Ctrl-Z, bg, sudo killall -r licornd and al.).

rss