YaST2 Developers Documentation: yast2-pam

yast2-pam

modules/PamSettings.ycp
YaST intrerface for security agent (/etc/security/*.conf) and /etc/default/passwd agent

This module has an unstable interface.

Global Functions

Local Variables

Local Functions

local default_passwd_modified -> boolean

Was /etc/default/passwd modified?

local security_modified -> boolean

Was anything under /etc/security/ modified?

global GetFiles () -> list<string>

Returns list of files currently handled by the module

local Filename (string name) -> string

Form absolute path name.

Parameters:
name
Return value:
to file
global GetValues (string file, string type) -> list<string>

Returns the values (options) of one type in the given file

Parameters:
file file name
type type of management group (these are used for authentication, account management and password management)
Return value:
of options
Example

 GetValues ("pwcheck", "password") returns [ "nullok", "cracklib" ]
global GetFile (string file) -> map

Returns the given file contents in the map form

Parameters:
file file name
Return value:
which maps type to list of its options
Example

 GetFile ("pwcheck") returns $[ "password" : [ "nullok", "cracklib" ] ]
global SetValues (string file, string type, list<string> values) -> boolean

Saves the new list of options of one type to given file

Parameters:
file file name
type type of management group
values
Return value:
success
Example

 SetValues ("pwcheck", "password", [ "cracklib", "md5" ])
global AddValue (string file, string type, string value) -> boolean

Adds a new options to the current list of options

Parameters:
file file name
type type of management group
value
Return value:
success
Example

 AddValue ("pwcheck", "password", "md5" ])
global RemoveValue (string file, string type, string value) -> boolean

Deletes an options from the current list of options

Parameters:
file file name
type type of management group
value
Return value:
success
Example

 RemoveValue ("pwcheck", "password", "md5" ])
global GetHashMethod () -> string

Reads the value of default crypt hash (defined in /etc/default/passwd)

global GetGroupHashMethod () -> string

Reads the value of default crypt hash for group passwords

global GetDefaultValue (string key) -> string

Reads the value from /etc/default/passwd

Parameters:
key
global SetHashMethod (string hash) -> boolean

Sets the new value of default crypt hash - modifies /etc/default/passwd !

Parameters:
hash the new value of hash
Example

 SetValues ("md5")
global SetGroupHashMethod (string hash) -> boolean

Sets the new value of default crypt hash for group passwords

Parameters:
hash the new value of hash
global SetDefaultValue (string key, string value) -> boolean

Set the value of key in /etc/default/passwd

Parameters:
key
value
global Write (boolean force) -> boolean

Writes all edited files to the disk

Parameters:
force - write everythink, even if modification was not detected
Return value:
true on success