This module provides shadow users & groups management support for
SysPolicy.
The features include full add, modify and remove operations and all
the attributes supported by the standard utilities are supported. These
include specifying the basedir, homedir, grouping of home directories,
real name of the user, account expiration and inactivity periods, groups,
custom skeleton directories, assigning specific shells and password
auto-generation combined with strength checking.
|
|
|
|
|
cs_set_attribute(self,
group,
attribute,
value,
diff)
This function returns a ChangeSet respective to a changed policy
attribute. |
source code
|
|
|
|
cs_add_user(self,
username,
group,
password,
extragroups=[],
name=None,
homedir=None,
policy={})
This function returns a ChangeSet for when a new user account needs
to be created. |
source code
|
|
|
|
cs_mod_user(self,
username,
group=None,
extragroups=[],
password=None,
name=None,
homedir=None,
policy={})
This function returns a ChangeSet which performs user modification. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
add_user(self,
change)
This function performs user addition by executing the useradd
command. |
source code
|
|
|
|
mod_user(self,
change)
This function performs user modification by executing the usermod
command. |
source code
|
|
|
|
del_user(self,
change)
This function performs user deletion by executing the userdel
command. |
source code
|
|
|
|
add_group(self,
change)
This function performs group addition by executing the groupadd
command. |
source code
|
|
|
|
del_group(self,
change)
This function performs group deletion by executing the groupdel
command. |
source code
|
|
|
|
get_password_policy(self)
This module returns the system main password security policy by
looking it up from the main configuration and the service policy. |
source code
|
|
|
Inherited from module.Module:
append_lines_to_file,
cs_check_diff,
cs_new_attribute,
cs_rem_attribute,
cs_set_default,
edit_configfile,
execute,
perform_change
|