• Increase font size
  • Default font size
  • Decrease font size
Home Software SysFunc Sysfunc Reference Guide - Users and groups

Sysfunc Reference Guide - Users and groups

E-mail Print
Read : 2,894 times
(0 votes, average 0 out of 5)
Article Index
Sysfunc Reference Guide
Configuration parameters
System database
Disk management
Error handling
File manipulation
Filesystems
IP V4 addresses
Kernel
Logical volume manager
Miscellaneous
Message display
User interaction
Network
OS
File backup
Software packages
Services
Time and date
Temporary file management
Users and groups
Vmware-specific
Function index
All Pages

create_group

Create a user group

Arguments

$1Group name
$2Group Id

Returns

Status from system command

Displays

Info msg

create_user

Create a user

To set the login shell, initialize the CREATE_USER_SHELL variable before calling the function.

For accounts with no access allowed (blocked accounts), $7, $8, and $9 are not set.

Arguments

$1User name
$2uid
$3gid
$4description (gecos)
$5home dir (can be '' for '/none')
$6Additional groups (separated with ',')
$7encrypted password (Linux)
$8encrypted password (HP-UX & SunOS)
$9encrypted password (AIX)

Returns

Always 0

Displays

Info msg

delete_group

Remove a group

Arguments

$1Group name

Returns

Status from system command

Displays

nothing

delete_user

Remove a user account

Arguments

$1User name

Returns

Status from system command

Displays

nothing

set_passwd

Change a user's password

Works on HP-UX, Solaris, and Linux.

Replaces an encrypted passwd in /etc/passwd or /etc/shadow.

TODO: Unify with AIX and autodetect the file to use (passwd/shadow)

Arguments

$1Username
$2Encrypted password
$3File path

Returns

Always 0

Displays

Nothing

set_passwd_aix

Set an AIX password

TODO: Unify with other supported OS

Arguments

$1Username
$2Encrypted password

Returns

Always 0

Displays

nothing

user_exists

Checks if a given user exists on the system

Arguments

$1User name to check

Returns

0 if user exists; != 0 if not

Displays

nothing

user_gid

Return GID of a given user

Arguments

$1User name

Returns

0 if user exists, 1 if not

Displays

Primary GID if user exists, nothing if not

user_uid

Return UID of a given user

Arguments

$1User name

Returns

0 if user exists, 1 if not

Displays

UID if user exists, nothing if not

 

Please login or register to add a comment