OobsUser

OobsUser — Object that represents an individual user.

Synopsis




                    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);

Object Hierarchy


  GObject
   +----OobsUser

Properties


  "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

Description

Details

OobsUser

typedef struct _OobsUser OobsUser;


oobs_user_new ()

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.

oobs_user_get_login_name ()

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.

oobs_user_set_login_name ()

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.

oobs_user_set_password ()

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.

oobs_user_set_crypted_password ()

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.

oobs_user_get_uid ()

uid_t               oobs_user_get_uid                   (OobsUser *user);

Returns the UID for this user.

user : An OobsUser.
Returns : user UID.

oobs_user_set_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.

oobs_user_get_main_group ()

OobsGroup*          oobs_user_get_main_group            (OobsUser *user);

Returns the main group of this user.

user : An OobsUser.
Returns : main group for the user. this value is owned by the OobsUser object, you do not have to unref it.

oobs_user_set_main_group ()

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.

user : An OobsUser.
main_group : an OobsGroup, new main group for the user.

oobs_user_get_home_directory ()

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.

oobs_user_set_home_directory ()

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.

oobs_user_get_shell ()

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.

oobs_user_set_shell ()

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.

oobs_user_get_full_name ()

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.

oobs_user_set_full_name ()

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.

oobs_user_get_room_number ()

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.

oobs_user_set_room_number ()

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.

oobs_user_get_work_phone_number ()

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.

oobs_user_set_work_phone_number ()

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.

oobs_user_get_home_phone_number ()

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.

oobs_user_set_home_phone_number ()

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.

oobs_user_get_other_data ()

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.

oobs_user_set_other_data ()

void                oobs_user_set_other_data            (OobsUser *user,
                                                         const gchar *data);

Sets the data in the fifth GECOS field.

user : An OobsUser.
data : data in the fifth GECOS field.

Property Details

The "crypted-password" property

  "crypted-password"         gchararray            : Read / Write

Crypted password for the user.

Default value: NULL


The "full-name" property

  "full-name"                gchararray            : Read / Write

User's full name.

Default value: NULL


The "home-directory" property

  "home-directory"           gchararray            : Read / Write

Home directory for the user.

Default value: NULL


The "home-phone" property

  "home-phone"               gchararray            : Read / Write

User's home phone.

Default value: NULL


The "name" property

  "name"                     gchararray            : Read / Write

Login name for the user.

Default value: NULL


The "other-data" property

  "other-data"               gchararray            : Read / Write

Aditional data for the user.

Default value: NULL


The "password" property

  "password"                 gchararray            : Write

Password for the user.

Default value: NULL


The "room-number" property

  "room-number"              gchararray            : Read / Write

User's room number.

Default value: NULL


The "shell" property

  "shell"                    gchararray            : Read / Write

Default shell for the user.

Default value: NULL


The "uid" property

  "uid"                      gint                  : Read / Write

UID for the user.

Allowed values: [0,65534]

Default value: 65534


The "work-phone" property

  "work-phone"               gchararray            : Read / Write

User's work phone.

Default value: NULL