From 00e2b03927b5c107aefef1c71ef14facd4c3cb77 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 1 Sep 2015 16:44:03 +0200 Subject: Move doc/ to documentation/api/ Signed-off-by: Jo-Philipp Wich --- documentation/api/modules/luci.sys.user.html | 384 +++++++++++++++++++++++++++ 1 file changed, 384 insertions(+) create mode 100644 documentation/api/modules/luci.sys.user.html (limited to 'documentation/api/modules/luci.sys.user.html') diff --git a/documentation/api/modules/luci.sys.user.html b/documentation/api/modules/luci.sys.user.html new file mode 100644 index 0000000000..976dac6124 --- /dev/null +++ b/documentation/api/modules/luci.sys.user.html @@ -0,0 +1,384 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Class luci.sys.user

+ +

+ +LuCI system utilities / user related functions. +

+ + + + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + +
getuser (uid) + +Retrieve user informations for given uid.
checkpasswd (username, pass) + +Test whether given string matches the password of a given system user.
getpasswd (username) + +Retrieve the current user password hash.
setpasswd (username, password) + +Change the password of given user.
+ + + + + + +
+
+ + +

Functions

+
+ + + +
getuser (uid)
+
+ + +Retrieve user informations for given uid. + + + +

Parameters

+
    + +
  • + uid: Number containing the Unix user id +
  • + +
+ + + + + + +

Return value:

+Table containing the following fields: + { "uid", "gid", "name", "passwd", "dir", "shell", "gecos" } + + + +
+ + + + +
checkpasswd (username, pass)
+
+ + +Test whether given string matches the password of a given system user. + + + +

Parameters

+
    + +
  • + username: String containing the Unix user name +
  • + +
  • + pass: String containing the password to compare +
  • + +
+ + + + + + +

Return value:

+Boolean indicating wheather the passwords are equal + + + +
+ + + + +
getpasswd (username)
+
+ + +Retrieve the current user password hash. + + + +

Parameters

+
    + +
  • + username: String containing the username to retrieve the password for +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. String containing the hash or nil if no password is set. + +
  2. Password database entry + +
+ + + +
+ + + + +
setpasswd (username, password)
+
+ + +Change the password of given user. + + + +

Parameters

+
    + +
  • + username: String containing the Unix user name +
  • + +
  • + password: String containing the password to compare +
  • + +
+ + + + + + +

Return value:

+Number containing 0 on success and >= 1 on error + + + +
+ + +
+ + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + -- cgit v1.2.3