org.freedesktop.Accounts

org.freedesktop.Accounts

Accounts interface

# Methods

    ListCachedUsers(out'ao'users)
    FindUserById(in'x'id,
    out'o'user)
    FindUserByName(in's'name,
    out'o'user)
    CreateUser(in's'name,
    in's'fullname,
    out'o'user,
    in'i'accountType)
    CacheUser(in's'name,
    out'o'user)
    UncacheUser(in's'name)
    DeleteUser(in'x'id,
    in'b'removeFiles)

## Signals

    UserAdded('o'user)
    UserDeleted('o'user)

## Implemented Interfaces

Objects implementing org.freedesktop.Accounts also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

## Properties

    'DaemonVersion'read's'

## Description

## Details

### ListCachedUsers ()

    ListCachedUsers (out'ao'users)

Lists users which have logged into the system locally before. This is not meant to return an exhaustive list of all users. It is possible for `FindUserByName()` to return a user that's not on the list.

`users`:

- Object paths of cached users

### FindUserById ()

    FindUserById (in'x'id,
    out'o'user)

Finds a user by uid.

`id`:

- The uid to look up

`user`:

- Object path of user

#### Errors

`org.freedesktop.Accounts.Error.Failed`:

- if no user with the given uid exists

### FindUserByName ()

    FindUserByName (in's'name,
    out'o'user)

Finds a user by its username.

`name`:

- The username to look up

`user`:

- Object path of user

#### Errors

`org.freedesktop.Accounts.Error.Failed`:

- if no user with the given username exists

### CreateUser ()

    CreateUser (in's'name,
    in's'fullname,
    out'o'user,
    in'i'accountType)

Creates a new user account.

The accountType argument can take the following values:

- 0: Standard user

- 1: Administrator

`name`:

- The username for the new user

`fullname`:

- The real name for the new user

`user`:

- Object path of the new user

`accountType`:

- The account type, encoded as an integer

#### Errors

`org.freedesktop.Accounts.Error.PermissionDenied`:

- if the caller lacks the appropriate PolicyKit authorization

`org.freedesktop.Accounts.Error.Failed`:

- if the operation failed

#### Permissions

The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization.

### CacheUser ()

    CacheUser (in's'name,
    out'o'user)

Caches a user account, so that it shows up in ListCachedUsers() output. The user name may be a remote user, but the system must be able to lookup the user name and resolve the user information.

`name`:

- The username for the user

`user`:

- Object path of user

#### Errors

`org.freedesktop.Accounts.Error.PermissionDenied`:

- if the caller lacks the appropriate PolicyKit authorization

`org.freedesktop.Accounts.Error.UserDoesNotExist`:

- if the user name cannot be resolved

#### Permissions

The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization.

### UncacheUser ()

    UncacheUser (in's'name)

Releases all metadata about a user account, including icon, language and session. If the user account is from a remote server and the user has never logged in before, then that account will no longer show up in ListCachedUsers() output.

`name`:

- The username for the user

#### Errors

`org.freedesktop.Accounts.Error.PermissionDenied`:

- if the caller lacks the appropriate PolicyKit authorization

`org.freedesktop.Accounts.Error.UserDoesNotExist`:

- if the user name cannot be resolved

#### Permissions

The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization.

### DeleteUser ()

    DeleteUser (in'x'id,
    in'b'removeFiles)

Deletes a user account.

`id`:

- The uid to delete

`removeFiles`:

- Whether to remove the users files

#### Errors

`org.freedesktop.Accounts.Error.PermissionDenied`:

- if the caller lacks the appropriate PolicyKit authorization

`org.freedesktop.Accounts.Error.Failed`:

- if the operation failed

#### Permissions

The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization.

## Signal Details

### The UserAdded signal

    UserAdded ('o'user)

Emitted when a user is added.

`user`:

- Object path of the user that was added.

### The UserDeleted signal

    UserDeleted ('o'user)

Emitted when a user is deleted.

`user`:

- Object path of the user that was deleted.

## Property Details

### The "DaemonVersion" property

    'DaemonVersion'read's'

The version of the running daemon.