Package syspolicy :: Package modules :: Module shadow
[hide private]
[frames] | no frames]

Module shadow

source code

Shadow users/passwords configuration support

Classes [hide private]
  Shadow
This module provides shadow users & groups management support for SysPolicy.
Functions [hide private]
 
list_groups()
This function lists all the groups in the system.
source code
 
list_users()
This function lists all the users in the system.
source code
 
get_group_by_id(id)
This function gets a group by it's GID.
source code
 
get_group_by_name(name)
This function gets a group by it's name.
source code
 
group_exists(name)
This function checks if a group with the name `name` exists.
source code
 
get_user_by_name(name)
This function gets a user by it's name.
source code
 
list_users_with_gid(gid)
This function lists users with the primary group id `gid`
source code
Variables [hide private]
  USERADD = '/usr/sbin/useradd'
  USERMOD = '/usr/sbin/usermod'
  USERDEL = '/usr/sbin/userdel'
  GROUPADD = '/usr/sbin/groupadd'
  GROUPDEL = '/usr/sbin/groupdel'
  __package__ = 'syspolicy.modules'
Function Details [hide private]

list_groups()

source code 

This function lists all the groups in the system.

Returns:
List of existing groups

list_users()

source code 

This function lists all the users in the system.

Returns:
List of existing users

get_group_by_id(id)

source code 

This function gets a group by it's GID.

Returns:
Shadow group with the GID `id`

get_group_by_name(name)

source code 

This function gets a group by it's name.

Returns:
Shadow group with the name `name`

group_exists(name)

source code 

This function checks if a group with the name `name` exists.

Returns:
True if the grup exists, False otherwise

get_user_by_name(name)

source code 

This function gets a user by it's name.

Returns:
Shadow user with the name `name`

list_users_with_gid(gid)

source code 

This function lists users with the primary group id `gid`

Returns:
List of shadow users