Project

General

Profile

Manage core users » History » Version 24

psychic, 01/20/2019 01:07 PM

1 20 gry
h1. Manage core users 
2 1 seezer
3 21 gry
First the existing quasselcore commandline switches to add a user and to change a user's password are discussed. This is followed by a section on disabling and deleting users, as this is not yet available as a quasselcore switch; bug report and workarounds are provided.
4 1 seezer
5 21 gry
h2. Add a user (Version >= 0.5) 
6 20 gry
7 21 gry
quasselcore provides a command-line option:
8 23 ragna
* @--add-user@
9 7 seezer
>Starts an interactive session to add a new core user
10 7 seezer
11 21 gry
h3. Quassel Core permissions and config location (notes for Ubuntu and Debian users)
12 21 gry
13 13 wesleystout
*Note for Ubuntu (10.10 and lower) and Debian users*
14 9 fuzzy76
If you install quasselcore via the default Ubuntu (or Debian) package then your config dir is in '/var/cache/quassel'.  
15 23 ragna
This means that you need to run quasselcore @--add-user@ with @--configdir=/var/cache/quassel@ and with permissions such that it can access that directory.  Usually this means running it with sudo for Ubuntu or as root for Debian.  So for adding a user the example would be
16 8 smithbone
17 1 seezer
> <pre> sudo quasselcore --configdir=/var/cache/quassel --add-user </pre>
18 13 wesleystout
19 18 Anonymous
*Note for Ubuntu 11.04 (and later) Users*
20 13 wesleystout
If you install quasselcore via the default Ubuntu 11.04 package the config directory is now in '/var/lib/quassel'.
21 23 ragna
This means that you need to run quasselcore @--add-user@ with @--configdir=/var/lib/quassel@ and with permissions such that it can access that directory. Usually this means running it with sudo. So for adding a user the example would be
22 13 wesleystout
23 13 wesleystout
> <pre> sudo quasselcore --configdir=/var/lib/quassel --add-user </pre>
24 14 Dhraakellian
25 17 Anonymous
In case this still gives permission issues (recognized by the 'Core is currently not configured!' message), try:
26 17 Anonymous
> <pre>sudo -u quasselcore -s</pre> 
27 17 Anonymous
followed by 
28 17 Anonymous
> <pre>quasselcore -c /var/lib/quassel --add-user</pre>
29 17 Anonymous
30 19 kitterma
Similarly, it's necessary to be running as the correct user for password changes.  For Ubuntu (and Debian with the correct path) this works, although you will have to stop a running core first:
31 19 kitterma
32 19 kitterma
> <pre>sudo start-stop-daemon --start --chuid 'quasselcore' --exec 'quasse/usr/bin/quasselcore' --configdir='var/lib/quassel' --change-userpass=$USER_TO_BE_CHANGED</pre>
33 19 kitterma
34 14 Dhraakellian
*Note for openSUSE Users*
35 15 Dhraakellian
If you install quasselcore via the openSUSE package (at least from the KDE:Extra repositories), the config directory is in '/var/lib/quasselcore'.
36 23 ragna
This means that you need to run quasselcore @--add-user@ with @--configdir=/var/lib/quasselcore@ and with permissions such that it can access that directory. Usually this means running it as root or with sudo. So for adding a user the example would be
37 14 Dhraakellian
38 14 Dhraakellian
> <pre> sudo quasselcore --configdir=/var/lib/quasselcore --add-user </pre>
39 16 javier
40 16 javier
and for changing an user's password:
41 1 seezer
42 1 seezer
> <pre> quasselcore --change-userpass=someusername --configdir=/var/lib/quasselcore </pre>
43 16 javier
(run as root)
44 1 seezer
45 21 gry
h2. Change a user's password (Version >= 0.5)
46 1 seezer
47 21 gry
quasselcore provides a command-line option:
48 23 ragna
* @--change-userpass=[USERNAME]@
49 21 gry
>Starts an interactive session to change the password of the user identified by username
50 1 seezer
51 21 gry
Note: please see the quassel core permissions and config location section above!
52 21 gry
53 24 psychic
54 24 psychic
Example on Ubuntu 18.04.1 LTS with Quassel v0.12.4
55 24 psychic
56 24 psychic
Find username for quasselcore service:
57 24 psychic
58 24 psychic
ls -lah /var/lib | grep quassel
59 24 psychic
60 24 psychic
Should return something like this :
61 24 psychic
62 24 psychic
drwxxr-xr-x 2 quasselcore quassel [...] quassel
63 24 psychic
64 24 psychic
The user name for the service is quasselcore
65 24 psychic
66 24 psychic
Run this command to change the password for user foobar
67 24 psychic
68 24 psychic
sudo -u quasselcore quasselcore --configdir=/var/lib/quassel --change-userpass=foobar
69 24 psychic
70 24 psychic
71 21 gry
h2. Disable a user account
72 21 gry
73 21 gry
Disabling a user account prevents login, but their backlog and settings are still kept.
74 21 gry
75 21 gry
Quassel Core does not have a commandline switch to disable a user's account. As a workaround for disabling an account, change their password to an arbitrary long string.
76 21 gry
77 21 gry
h2. Delete a user account
78 21 gry
79 21 gry
Disabling a user account prevents login, and their backlog and settings are also removed.
80 21 gry
81 23 ragna
Deletion of users as a @quasselcore --del-user@ switch is not implemented. It is tracked as a feature request:
82 21 gry
83 20 gry
- https://bugs.quassel-irc.org/issues/909
84 20 gry
85 22 ragna
There is a script [[Delete_Users|to delete users]] directly from the database.