AccountsService-23.13.9

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-553

### Chapter 12. System Utilities

- Prev

  7zip-26.01

- Next

  acpid-2.0.34

- Up
- Home

# AccountsService-23.13.9

## Introduction to AccountsService

The AccountsService package provides a set of D-Bus interfaces for querying and manipulating user account information and an implementation of those interfaces based on the usermod(8), useradd(8), and userdel(8) commands.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://www.freedesktop.org/software/accountsservice/accountsservice-23.13.9.tar.xz

- Download MD5 sum: 03dccfe1b306b7ca19743e86d118e64d

- Download size: 621 KB

- Estimated disk space required: 9.8 MB (add 0.5 MB for tests)

- Estimated build time: less than 0.1 SBU (with tests)

### AccountsService Dependencies

#### Required

Polkit-127

#### Recommended

GLib-2.88.1 (with GObject Introspection), Systemd-260.1 (runtime), and Vala-0.56.19

#### Optional

GTK-Doc-1.36.1 and xmlto-0.0.29

#### Optional (for tests)

dbusmock-0.38.1 and PyGObject-3.56.2

## Installation of AccountsService

First, rename a directory whose presence prevents the build system from running if dbusmock-0.38.1 is not installed:

    mv tests/dbusmock{,-tests}

Then fix a test script so that the new directory is found, and adapt it for Python 3.12.0 or later:

    sed -e '/accounts_service\.py/s/dbusmock/dbusmock-tests/' \
        -e 's/assertEquals/assertEqual/'                      \
        -i tests/test-libaccountsservice.py

Fix one test that fails if the `en_IE.UTF-8` locale is not installed:

    sed -i '/^SIMULATED_SYSTEM_LOCALE/s/en_IE.UTF-8/en_HK.iso88591/' tests/test-daemon.py

Install AccountsService by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup ..            \
          --prefix=/usr       \
          --buildtype=release \
          -D admin_group=adm

Now adapt the shipped mocklibc copy to allow building the test suite with GCC 14 or later:

    grep 'print_indent'     ../subprojects/mocklibc-1.0/src/netgroup.c \
         | sed 's/ {/;/' >> ../subprojects/mocklibc-1.0/src/netgroup.h &&
    sed -i '1i#include <stdio.h>'                                      \
        ../subprojects/mocklibc-1.0/src/netgroup.h

Build the package:

    ninja

To test the package, issue ninja test.

Now, as the `root` user:

    ninja install

## Command Explanations

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D admin_group=adm`: This switch sets the group for administrator accounts.

`-D docbook=true`: This switch enables building the D-Bus interface API documentation (needs xmlto-0.0.29).

`-D gtk_doc=true`: This switch enables building the libaccountsservice API documentation (needs GTK-Doc-1.36.1).

`-D vapi=false`: This switch disables building the vala bindings. Use it if you have not installed Vala-0.56.19.

## Configuring AccountsService

To allow users in the adm group to be listed as Administrators, execute the following commands as the `root` user:

    cat > /etc/polkit-1/rules.d/40-adm.rules << "EOF"
    polkit.addAdminRule(function(action, subject) {
       return ["unix-group:adm"];
       });
    EOF

## Contents

Installed Programs: accounts-daemon (in `/usr/libexec`)
Installed Libraries: libaccountsservice.so
Installed Directories: /usr/include/accountsservice-1.0, /usr/share/accountsservice, /usr/share/gtk-doc/html/libaccountsservice (optional), and /var/lib/AccountsService

### Short Descriptions

accounts-daemon | is the AccountsService daemon
`libaccountsservice.so` | contains the AccountsService API functions

- Prev

  7zip-26.01

- Next

  acpid-2.0.34

- Up
- Home