{"id":6833,"date":"2022-12-20T19:33:42","date_gmt":"2022-12-20T22:33:42","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/manatoolsmoduleusers-man3\/"},"modified":"2022-12-20T19:33:42","modified_gmt":"2022-12-20T22:33:42","slug":"manatoolsmoduleusers-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/manatoolsmoduleusers-man3\/","title":{"rendered":"ManaTools::Module::Users (man3)"},"content":{"rendered":"<h1 align=\"center\">ManaTools::Module::Users<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SUPPORT\">SUPPORT<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT and LICENSE\">COPYRIGHT and LICENSE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ManaTools::Module::Users \u2212 This module aims to manage service <br \/> with GUI<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">my $userManager = ManaTools::Module::Users\u2212>new(); <br \/> $userManager\u2212>start();<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This module is a tool to manage users on the system. <br \/> From the original code adduserdrake and userdrake.<\/p>\n<h2>SUPPORT <a name=\"SUPPORT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">You can find documentation for this module with the perldoc command: <br \/> perldoc ManaTools::Module::Users<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ManaTools::Module<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Angelo Naselli <anaselli@linux.it><\/p>\n<h2>COPYRIGHT and LICENSE <a name=\"COPYRIGHT and LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (C) 2013\u22122017, Angelo Naselli.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is free software; you can redistribute it and\/or modify it under the terms of the <small>GNU<\/small> General Public License version 2, as published by the Free Software Foundation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is distributed in the hope that it will be useful, but <small>WITHOUT ANY WARRANTY<\/small> ; without even the implied warranty of <small>MERCHANTABILITY<\/small> or <small>FITNESS FOR A PARTICULAR PURPOSE.<\/small> See the <small>GNU<\/small> General Public License for more details.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You should have received a copy of the <small>GNU<\/small> General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place \u2212 Suite 330, Boston, <small>MA 02111\u22121307, USA<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>configName<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">name: module name<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Returns the module name as configuration subdirectory. <br \/> This method is required by ConfigDirRole<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>start<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This method extends Module::start and is invoked to <br \/> start adminService<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>BUILD<\/small><\/b> <small><i><br \/> INPUT<\/i><\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The BUILD method is called after a Moose object is created, <br \/> Into this method additional data are initialized.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ChooseGroup<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$choice: 0 or 1 (choice) <br \/> \u22121 cancel or exit<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">creates a popup dialog to ask if adding user to an existing group or to the \u2019users\u2019 group<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_deleteGroupDialog<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This method open a dialog to delete the selected group.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_deleteUserDialog<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This method open a dialog to delete the selected user. <br \/> It also asks for additional information to be removed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_buildUserData<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $layout : layout in wich drawing graphic user data<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$userData: hash reference containing reference to graphical object <br \/> such as: <br \/> full_name, login_name, password, password1, <br \/> login_shell <br \/> full_name, login_name, password, password1, <br \/> weakness (icon), login_shell<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This method is used by addUserDialog and _editUserDialog <br \/> to create User Data dialog<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>addUserDialog<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $standalone: if set the application title is set <br \/> from the name set in costructor<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This method creates and manages the dialog to add a new <br \/> user.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_createUserTable<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This function create the User table to be added to the replace point of the tab widget. Note this function is meant for internal use only<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_createGroupTable<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This function create the Group table to be added to the replace point of the tab widget. Note this function is meant for internal use only<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_refreshUsers<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This method refresh user info into User tab widget. <br \/> Note this function is meant for internal use only<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_refreshGroups<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This method refresh group info into Group tab widget. <br \/> Note this function is meant for internal use only<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_getUserInfo<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$userData: HASH reference containing: <br \/> username: username <br \/> full_name: full name of user <br \/> shell: shell used <br \/> homedir: home dir path <br \/> UID: User identifier <br \/> acc_check_exp: account expiration enabling <br \/> acc_expy: account expiration year <br \/> acc_expm: account expiration month <br \/> acc_expd: account expiration day <br \/> lockuser: account locked <br \/> pwd_check_exp: password expiration enabling <br \/> pwd_exp_min: days before changing password <br \/> is allowed <br \/> pwd_exp_max: days before changing password <br \/> is required <br \/> pwd_exp_warn: warning days before changing <br \/> pwd_exp_inact: days before account becomes <br \/> inact <br \/> members: Array containing groups the user <br \/> belongs to. <br \/> primary_group: primary group ID for the user<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Retrieves the selected user info from the system <br \/> Note that acc_expy, acc_expm and acc_expd are valid if <br \/> acc_check_exp is enabled. <br \/> Note that pwd_exp_min, pwd_exp_max, pwd_exp_warn, <br \/> pwd_exp_inact are valid if pwd_check_exp is enabled.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_getUserInfo<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">%groupData: selected group info as: <br \/> $groupname: group name <br \/> $members: users that are members of this group<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Retrieves the selected group info from the system<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_userDataTabWidget<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $dialog: YUI dialog that owns the YUI replace point <br \/> $replace_pnt: YUI replace point, needed to add a new tab <br \/> widget <br \/> $userData: hash reference containing user data info, tabs are <br \/> removed and added again on selection, so <br \/> data must be saved outside of widgets.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$userDataWidget: hash containing new YUI widget objects <br \/> such as: <br \/> returned onject from _buildUserData and <br \/> homedir.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This internal method removes old tab widget saving its <br \/> relevant data into userData and creates new selected table <br \/> to be shown.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_groupDataTabWidget<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $dialog: YUI dialog that owns the YUI replace point <br \/> $replace_pnt: YUI replace point, needed to add a new tab <br \/> widget <br \/> %groupData: hash containing group data info, tabs are <br \/> removed and added again on selection, so <br \/> data must be saved outside of widgets. <br \/> $previus_tab: previous tab widget label, needed to store <br \/> group data from the old tab before removing <br \/> it, if user changed something.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">%groupDataWidget: hash containing new YUI widget objects <br \/> such as: <br \/> groupname.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This internal method removes old tab widget saving its <br \/> relevant data into groupData and creates new selected table <br \/> to be shown.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_skipShortcut<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $label: an item label to be cleaned by keyboard shortcut &#8220;&#038;&#8221;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$label: cleaned label<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This internal method is a workaround to label that are <br \/> changed by &#8220;&#038;&#8221; due to keyborad shortcut.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ManaTools::Module::Users \u2212 This module aims to manage service  with GUI <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3198],"class_list":["post-6833","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-manatoolsmoduleusers"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6833"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6833\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}