![]() |
![]() |
![]() |
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_login_name (OobsUser *user, const gchar *login); 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);
"crypted-password" gchararray : Read / Write "full-name" gchararray : Read / Write "home-directory" gchararray : Read / Write "home-phone" gchararray : Read / Write "name" gchararray : Read / Write "other-data" gchararray : Read / Write "password" gchararray : Write "room-number" gchararray : Read / Write "shell" gchararray : Read / Write "uid" gint : Read / Write "work-phone" gchararray : Read / Write
OobsUser* oobs_user_new (const gchar *name);
Returns a new user with the given login name.
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.
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_login_name (OobsUser *user, const gchar *login);
Sets a new login name for the user, overwriting the previous one.
user : |
An OobsUser. |
login : |
a new login name for the user. |
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.
user : |
An OobsUser. |
password : |
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.
user : |
An OobsUser. |
crypted_password : |
a new crypted password. |
uid_t oobs_user_get_uid (OobsUser *user);
Returns the UID for this user.
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.
user : |
An OobsUser. |
uid : |
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.
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.
user : |
An OobsUser. |
home_directory : |
new home directory path for the user. |
const gchar* oobs_user_get_shell (OobsUser *user);
Returns the default shell used by the user.
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.
user : |
An OobsUser. |
shell : |
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.
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.
user : |
An OobsUser. |
full_name : |
new full name for the user. |
const gchar* oobs_user_get_room_number (OobsUser *user);
Returns the second GECOS field, usually the room number.
user : |
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.
user : |
An OobsUser. |
room_number : |
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.
user : |
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.
user : |
An OobsUser. |
phone_number : |
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.
user : |
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.
user : |
An OobsUser. |
phone_number : |
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.
user : |
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" gchararray : Read / Write
Crypted password for the user.
Default value: NULL
"full-name"
property"full-name" gchararray : Read / Write
User's full name.
Default value: NULL
"home-directory"
property"home-directory" gchararray : Read / Write
Home directory for the user.
Default value: NULL
"home-phone"
property"home-phone" gchararray : Read / Write
User's home phone.
Default value: NULL
"other-data"
property"other-data" gchararray : Read / Write
Aditional data for the user.
Default value: NULL
"room-number"
property"room-number" gchararray : Read / Write
User's room number.
Default value: NULL
"shell"
property"shell" gchararray : Read / Write
Default shell for the user.
Default value: NULL
"uid"
property"uid" gint : Read / Write
UID for the user.
Allowed values: [0,65534]
Default value: 65534
"work-phone"
property"work-phone" gchararray : Read / Write
User's work phone.
Default value: NULL