LnxUser PHP Class Reference

Innen: IT documentation
A lap korábbi változatát látod, amilyen Moszat (vitalap | szerkesztései) 2021. szeptember 21., 20:41-kor történt szerkesztése után volt. (→‎Changelog)

Introduction

Linux user and group management in PHP.

Basically this library a php interface of useradd, groupadd, usermod, groupmod, userdel, groupdel linux commands. You can manage easily the linux users and groups with this library from a php apllication.

Requirements

  • Of course this library can work just linux environment.
  • The running user of php environment must has root privileges for manage the users and groups.
  • Must enable the shell_exec function.
  • Tested on Ubuntu with PHP 7.0 - 8.1 versions.

Features

  • Create a linux user or a group.
  • Get all information about a linux user or a group.
  • Set all attributes of a linux user or a group.
  • Delete a linux user or a group.
  • Examine if exists a linux user or a group.
  • Authenticate a linux user.
  • Generate password hash.

Constants

Value Constant Description Note
DES LNX_PH_DES (string) DES-based crypt for the future
MD5 LNX_PH_MD5 (string) MD5-based crypt
SHA256 LNX_PH_SHA256 (string) SHA-256-based crypt
SHA512 LNX_PH_SHA512 (string) SHA-512-based crypt

Methods

Changelog

Version

(lnxUser)

Description
1.1 add: use systemlog at user auth
remove: mkpassword dependency
add: default hash handle
1.00 available

Source

https://github.com/moszat/lnxUser