![]() |
![]() |
![]() |
Liboobs (System configuration management) Reference Manual | ![]() |
---|---|---|---|---|
OobsUser; OobsUser* oobs_user_new (const gchar *name); const gchar* oobs_user_get_login_name (OobsUser *user); void oobs_user_set_password (OobsUser *user, const gchar *password); void oobs_user_set_crypted_password (OobsUser *user, const gchar *crypted_password); uid_t oobs_user_get_uid (OobsUser *user); void oobs_user_set_uid (OobsUser *user, uid_t uid); OobsGroup* oobs_user_get_main_group (OobsUser *user); void oobs_user_set_main_group (OobsUser *user, OobsGroup *main_group); const gchar* oobs_user_get_home_directory (OobsUser *user); void oobs_user_set_home_directory (OobsUser *user, const gchar *home_directory); const gchar* oobs_user_get_shell (OobsUser *user); void oobs_user_set_shell (OobsUser *user, const gchar *shell); const gchar* oobs_user_get_full_name (OobsUser *user); void oobs_user_set_full_name (OobsUser *user, const gchar *full_name); const gchar* oobs_user_get_room_number (OobsUser *user); void oobs_user_set_room_number (OobsUser *user, const gchar *room_number); const gchar* oobs_user_get_work_phone_number (OobsUser *user); void oobs_user_set_work_phone_number (OobsUser *user, const gchar *phone_number); const gchar* oobs_user_get_home_phone_number (OobsUser *user); void oobs_user_set_home_phone_number (OobsUser *user, const gchar *phone_number); const gchar* oobs_user_get_other_data (OobsUser *user); void oobs_user_set_other_data (OobsUser *user, const gchar *data);
"active" gboolean : Read "crypted-password" gchar* : Read / Write "full-name" gchar* : Read / Write "home-directory" gchar* : Read / Write "home-phone" gchar* : Read / Write "name" gchar* : Read / Write / Construct Only "other-data" gchar* : Read / Write "password" gchar* : Write "room-number" gchar* : Read / Write "shell" gchar* : Read / Write "uid" gint : Read / Write "work-phone" gchar* : Read / Write
OobsUser* oobs_user_new (const gchar *name);
Returns a new user with the given login name.
|
login name for the new user. |
Returns : |
A newly allocated OobsUser. |
const gchar* oobs_user_get_login_name (OobsUser *user);
Returns the login name of the user.
|
An OobsUser. |
Returns : |
A pointer to the login name as a string. This string must not be freed, modified or stored. |
void oobs_user_set_password (OobsUser *user, const gchar *password);
Sets a new password for the user. This password will be interpreted as clean text and encrypted internally, be careful deleting the passed string after using this function.
|
An OobsUser. |
|
a new password for the user. |
void oobs_user_set_crypted_password (OobsUser *user, const gchar *crypted_password);
Sets a new password for the user. This password will be considered to be already crypted.
|
An OobsUser. |
|
a new crypted password. |
uid_t oobs_user_get_uid (OobsUser *user);
Returns the UID for this user.
|
An OobsUser. |
Returns : |
user UID. |
void oobs_user_set_uid (OobsUser *user, uid_t uid);
Sets a new UID for the user. files formerly owned by the user will not be chowned to the new UID, be careful using this function.
|
An OobsUser. |
|
a new UID for the user. |
OobsGroup* oobs_user_get_main_group (OobsUser *user);
Returns the main group of this user.
void oobs_user_set_main_group (OobsUser *user, OobsGroup *main_group);
Sets the main group for the user, adds a reference to the new main group.
const gchar* oobs_user_get_home_directory (OobsUser *user);
Returns the home directory path of the user.
|
An OobsUser. |
Returns : |
A pointer to the home directory as a string. This string must not be freed, modified or stored. |
void oobs_user_set_home_directory (OobsUser *user, const gchar *home_directory);
Sets a new home directory for the user. files stored in the previous home directory will not be moved, be careful using this function.
|
An OobsUser. |
|
new home directory path for the user. |
const gchar* oobs_user_get_shell (OobsUser *user);
Returns the default shell used by the user.
|
An OobsUser. |
Returns : |
A pointer to the default shell as a string. This string must not be freed, modified or stored. |
void oobs_user_set_shell (OobsUser *user, const gchar *shell);
Sets a new default shell for the user.
|
An OobsUser. |
|
a new default shell for the user. |
const gchar* oobs_user_get_full_name (OobsUser *user);
Returns the first GECOS field, usually the full name of the user.
|
An OobsUser. |
Returns : |
A pointer to the full name as a string. This string must not be freed, modified or stored. |
void oobs_user_set_full_name (OobsUser *user, const gchar *full_name);
Sets a new full name for the user.
|
An OobsUser. |
|
new full name for the user. |
const gchar* oobs_user_get_room_number (OobsUser *user);
Returns the second GECOS field, usually the room number.
|
An OobsUser. |
Returns : |
A pointer to the room number as a string. This string must not be freed, modified or stored. |
void oobs_user_set_room_number (OobsUser *user, const gchar *room_number);
Sets a new room number for the user.
|
An OobsUser. |
|
new room number for the user. |
const gchar* oobs_user_get_work_phone_number (OobsUser *user);
Returns the third GECOS field, usually the work phone number.
|
An OobsUser. |
Returns : |
A pointer to the work phone number as a string. This string must not be freed, modified or stored. |
void oobs_user_set_work_phone_number (OobsUser *user, const gchar *phone_number);
Sets a new work phone number for the user.
|
An OobsUser. |
|
new work phone number for the user. |
const gchar* oobs_user_get_home_phone_number (OobsUser *user);
Returns the fourth GECOS field, usually the home phone number.
|
An OobsUser. |
Returns : |
A pointer to the home phone number as a string. This string must not be freed, modified or stored. |
void oobs_user_set_home_phone_number (OobsUser *user, const gchar *phone_number);
Sets a new home phone number for the user.
|
An OobsUser. |
|
new home phone number for the user. |
const gchar* oobs_user_get_other_data (OobsUser *user);
Returns the fifth field of GECOS fields, reserved for additional data.
|
An OobsUser. |
Returns : |
A pointer to the fifth GECOS field as a string. This string must not be freed, modified or stored. |
"crypted-password"
property"crypted-password" gchar* : Read / Write
Crypted password for the user.
Default value: NULL
"home-directory"
property"home-directory" gchar* : Read / Write
Home directory for the user.
Default value: NULL
"name"
property"name" gchar* : Read / Write / Construct Only
Login name for the user.
Default value: NULL
"other-data"
property"other-data" gchar* : Read / Write
Aditional data for the user.
Default value: NULL
"room-number"
property"room-number" gchar* : Read / Write
User's room number.
Default value: NULL
"uid"
property"uid" gint : Read / Write
UID for the user.
Allowed values: [0,65534]
Default value: 65534