Top | ![]() |
![]() |
![]() |
![]() |
OobsObject * | oobs_users_config_get () |
OobsList * | oobs_users_config_get_users () |
OobsResult | oobs_users_config_add_user () |
OobsResult | oobs_users_config_delete_user () |
uid_t | oobs_users_config_get_minimum_users_uid () |
void | oobs_users_config_set_minimum_users_uid () |
uid_t | oobs_users_config_get_maximum_users_uid () |
void | oobs_users_config_set_maximum_users_uid () |
const gchar * | oobs_users_config_get_default_shell () |
void | oobs_users_config_set_default_shell () |
const gchar * | oobs_users_config_get_default_home_dir () |
void | oobs_users_config_set_default_home_dir () |
OobsGroup * | oobs_users_config_get_default_group () |
GList * | oobs_users_config_get_available_shells () |
gboolean | oobs_users_config_get_encrypted_home_support () |
GList * | oobs_users_config_get_available_locales () |
OobsUser * | oobs_users_config_get_from_login () |
OobsUser * | oobs_users_config_get_from_uid () |
gboolean | oobs_users_config_is_login_used () |
gboolean | oobs_users_config_is_uid_used () |
uid_t | oobs_users_config_find_free_uid () |
OobsGroup * | default-group | Read |
char * | default-home | Read / Write |
char * | default-shell | Read / Write |
gboolean | encrypted-home | Read |
guint | maximum-uid | Read / Write |
guint | minimum-uid | Read / Write |
OobsObject *
oobs_users_config_get (void
);
Returns the OobsUsersConfig singleton, which represents the system users and their configuration.
OobsResult oobs_users_config_add_user (OobsUsersConfig *config
,OobsUser *user
);
Add an user to the configuration, immediately committing changes to the system.
On success, user
will be appended to the users list.
OobsResult oobs_users_config_delete_user (OobsUsersConfig *config
,OobsUser *user
);
Delete an user from the configuration, immediately committing changes to the system.
On success, user
will be removed from the users list.
uid_t
oobs_users_config_get_minimum_users_uid
(OobsUsersConfig *config
);
Returns the default minimum UID for non-system users.
void oobs_users_config_set_minimum_users_uid (OobsUsersConfig *config
,uid_t uid
);
Sets the minimum UID for non-system users.
uid_t
oobs_users_config_get_maximum_users_uid
(OobsUsersConfig *config
);
Returns the default maximum UID for non-system users.
void oobs_users_config_set_maximum_users_uid (OobsUsersConfig *config
,uid_t uid
);
Sets the maximum UID for non-system users.
const gchar *
oobs_users_config_get_default_shell (OobsUsersConfig *config
);
Returns the default shell that will be used for new users.
void oobs_users_config_set_default_shell (OobsUsersConfig *config
,const gchar *shell
);
Sets a new default shell for new users, replacing the old one.
const gchar *
oobs_users_config_get_default_home_dir
(OobsUsersConfig *config
);
Returns the default home directory prefix for new users. when new users are created a directory with the user login name is created in that prefix.
void oobs_users_config_set_default_home_dir (OobsUsersConfig *config
,const gchar *home_dir
);
Sets a new home directory prefix used for newly created users, replacing the old one.
OobsGroup *
oobs_users_config_get_default_group (OobsUsersConfig *config
);
Returns an OobsGroup defining the default group used for new users.
GList *
oobs_users_config_get_available_shells
(OobsUsersConfig *config
);
Returns a GList containing strings with paths to the available shells.
gboolean
oobs_users_config_get_encrypted_home_support
(OobsUsersConfig *config
);
Returns whether encrypted home directories are supported by the platform (e.g. using eCryptfs).
GList *
oobs_users_config_get_available_locales
(OobsUsersConfig *config
);
OobsUser * oobs_users_config_get_from_login (OobsUsersConfig *config
,const gchar *login
);
Gets the (first) user whose login is login
. This is a convenience function
to avoid walking manually over the users list.
an OobsUser corresponding to the passed login,
or NULL
if no such user exists. Don't forget to unref user when you're done.
OobsUser * oobs_users_config_get_from_uid (OobsUsersConfig *config
,uid_t uid
);
Gets the (first) user whose UID is uid
. This is a convenience function
to avoid walking manually over the users list.
an OobsUser corresponding to the passed UID,
or NULL
if no such user exists. Don't forget to unref user when you're done.
gboolean oobs_users_config_is_login_used (OobsUsersConfig *config
,const gchar *login
);
Check whether login
is already used by an existing user or not. This is
a convenience function to avoid walking manually over the users list.
gboolean oobs_users_config_is_uid_used (OobsUsersConfig *config
,uid_t uid
);
Check whether uid
is already used by an existing user or not. This is
a convenience function to avoid walking manually over the users list.
uid_t oobs_users_config_find_free_uid (OobsUsersConfig *config
,uid_t uid_min
,uid_t uid_max
);
Finds an UID that is not used by any user in the list. The returned UID is
the highest used UID in the range plus one if uid_max
is not used.
Else, the first free UID in the range is returned.
If both uid_min
and uid_max
are equal to 0, the default range is used.
config |
An OobsUsersConfig. |
|
uid_min |
the minimum wanted UID. |
|
uid_max |
the maximum wanted UID. |
“default-group”
property“default-group” OobsGroup *
Default group for new users.
Owner: OobsUsersConfig
Flags: Read
“default-home”
property “default-home” char *
Default home directory for new users.
Owner: OobsUsersConfig
Flags: Read / Write
Default value: NULL
“default-shell”
property “default-shell” char *
Default shell for new users.
Owner: OobsUsersConfig
Flags: Read / Write
Default value: NULL
“encrypted-home”
property “encrypted-home” gboolean
Whether encrypted home dirs are supported.
Owner: OobsUsersConfig
Flags: Read
Default value: FALSE
“maximum-uid”
property “maximum-uid” guint
Maximum UID for non-system users.
Owner: OobsUsersConfig
Flags: Read / Write
Allowed values: <= G_MAXINT
Default value: 2147483647