Package comodit_client :: Package api :: Module application :: Class User

Class User


Application's user resource. This resource represents a user of the operating system the application might be installed on.

Instance Methods
 
add_group(self, group)
Adds a group to user's groups.
 
show(self, indent=0)
Prints this user's state to standard output in a user-friendly way.

Inherited from util.json_wrapper.JsonWrapper: __init__, dump_json, get_json, get_real_json, load_json, print_json, set_json

Inherited from object: __long__, __native__, __nonzero__, __unicode__, next

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
string login_group
User's login group.
list of string groups
List of user's groups.
string gid
User's GID.
string uid
User's UID.
string password
User's password.
string home
User's home directory.
string full_name
User's full name.
string shell
User's shell.
bool system
Flag telling if the user should be created as a system user or not.

Inherited from ApplicationResource: name

Inherited from object: __class__

Method Details

add_group(self, group)

 

Adds a group to user's groups.

Parameters:
  • group (string) - A group name.

show(self, indent=0)

 

Prints this user's state to standard output in a user-friendly way.

Parameters:
  • indent (int) - The number of spaces to put in front of each displayed line.
Overrides: ApplicationResource.show

Property Details

login_group

User's login group.

Get Method:
unreachable.login_group(self) - User's login group.
Set Method:
unreachable.login_group(self, group) - Sets user's login group.
Type:
string

groups

List of user's groups.

Get Method:
unreachable.groups(self) - List of user's groups.
Set Method:
unreachable.groups(self, groups) - Sets list of user's groups.
Type:
list of string

gid

User's GID.

Get Method:
unreachable.gid(self) - User's GID.
Set Method:
unreachable.gid(self, gid) - Sets user's GID.
Type:
string

uid

User's UID.

Get Method:
unreachable.uid(self) - User's UID.
Set Method:
unreachable.uid(self, uid) - Sets user's UID.
Type:
string

password

User's password.

Get Method:
unreachable.password(self) - User's password.
Set Method:
unreachable.password(self, password) - Sets user's password.
Type:
string

home

User's home directory.

Get Method:
unreachable.home(self) - User's home directory.
Set Method:
unreachable.home(self, home) - Sets user's home directory.
Type:
string

full_name

User's full name.

Get Method:
unreachable.full_name(self) - User's full name.
Set Method:
unreachable.full_name(self, full_name) - Sets user's full name.
Type:
string

shell

User's shell.

Get Method:
unreachable.shell(self) - User's shell.
Set Method:
unreachable.shell(self, shell) - Sets user's shell.
Type:
string

system

Flag telling if the user should be created as a system user or not.

Get Method:
unreachable.system(self) - Flag telling if the user should be created as a system user or not.
Set Method:
unreachable.system(self, system) - Sets user's system flag.
Type:
bool