??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
 Udac@`sddlmZmZmZeZidd6dgd6dd6ZdZd Zd Z dd l Z dd l Z dd l Z dd l Z dd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lmZdd lmZmZddlmZmZmZydd l Z e!Z"Wne#k r_e$Z"nXej%dZ&de'fdYZ(de(fdYZ)de)fdYZ*de(fdYZ+de(fdYZ,de(fdYZ-de(fdYZ.de(fdYZ/d e(fd!YZ0d"e(fd#YZ1d$e1fd%YZ2d&Z3e4d'kre3nd S((i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatustcoret supported_bys+ module: user version_added: "0.2" short_description: Manage user accounts description: - Manage user accounts and user attributes. - For Windows targets, use the M(win_user) module instead. options: name: description: - Name of the user to create, remove or modify. type: str required: true aliases: [ user ] uid: description: - Optionally sets the I(UID) of the user. type: int comment: description: - Optionally sets the description (aka I(GECOS)) of user account. type: str hidden: description: - macOS only, optionally hide the user from the login window and system preferences. - The default will be C(yes) if the I(system) option is used. type: bool version_added: "2.6" non_unique: description: - Optionally when used with the -u option, this option allows to change the user ID to a non-unique value. type: bool default: no version_added: "1.1" seuser: description: - Optionally sets the seuser type (user_u) on selinux enabled systems. type: str version_added: "2.1" group: description: - Optionally sets the user's primary group (takes a group name). type: str groups: description: - List of groups user will be added to. When set to an empty string C(''), the user is removed from all groups except the primary group. - Before Ansible 2.3, the only input format allowed was a comma separated string. - Mutually exclusive with C(local) type: list append: description: - If C(yes), add the user to the groups specified in C(groups). - If C(no), user will only be added to the groups specified in C(groups), removing them from all other groups. - Mutually exclusive with C(local) type: bool default: no shell: description: - Optionally set the user's shell. - On macOS, before Ansible 2.5, the default shell for non-system users was C(/usr/bin/false). Since Ansible 2.5, the default shell for non-system users on macOS is C(/bin/bash). - On other operating systems, the default shell is determined by the underlying tool being used. See Notes for details. type: str home: description: - Optionally set the user's home directory. type: path skeleton: description: - Optionally set a home skeleton directory. - Requires C(create_home) option! type: str version_added: "2.0" password: description: - Optionally set the user's password to this crypted value. - On macOS systems, this value has to be cleartext. Beware of security issues. - To create a disabled account on Linux systems, set this to C('!') or C('*'). - To create a disabled account on OpenBSD, set this to C('*************'). - See U(https://docs.ansible.com/ansible/faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module) for details on various ways to generate these password values. type: str state: description: - Whether the account should exist or not, taking action if the state is different from what is stated. type: str choices: [ absent, present ] default: present create_home: description: - Unless set to C(no), a home directory will be made for the user when the account is created or if the home directory does not exist. - Changed from C(createhome) to C(create_home) in Ansible 2.5. type: bool default: yes aliases: [ createhome ] move_home: description: - "If set to C(yes) when used with C(home: ), attempt to move the user's old home directory to the specified directory if it isn't there already and the old home exists." type: bool default: no system: description: - When creating an account C(state=present), setting this to C(yes) makes the user a system account. - This setting cannot be changed on existing users. type: bool default: no force: description: - This only affects C(state=absent), it forces removal of the user and associated directories on supported platforms. - The behavior is the same as C(userdel --force), check the man page for C(userdel) on your system for details and support. - When used with C(generate_ssh_key=yes) this forces an existing key to be overwritten. type: bool default: no remove: description: - This only affects C(state=absent), it attempts to remove directories associated with the user. - The behavior is the same as C(userdel --remove), check the man page for details and support. type: bool default: no login_class: description: - Optionally sets the user's login class, a feature of most BSD OSs. type: str generate_ssh_key: description: - Whether to generate a SSH key for the user in question. - This will B(not) overwrite an existing SSH key unless used with C(force=yes). type: bool default: no version_added: "0.9" ssh_key_bits: description: - Optionally specify number of bits in SSH key to create. type: int default: default set by ssh-keygen version_added: "0.9" ssh_key_type: description: - Optionally specify the type of SSH key to generate. - Available SSH key types will depend on implementation present on target host. type: str default: rsa version_added: "0.9" ssh_key_file: description: - Optionally specify the SSH key filename. - If this is a relative filename then it will be relative to the user's home directory. - This parameter defaults to I(.ssh/id_rsa). type: path version_added: "0.9" ssh_key_comment: description: - Optionally define the comment for the SSH key. type: str default: ansible-generated on $HOSTNAME version_added: "0.9" ssh_key_passphrase: description: - Set a passphrase for the SSH key. - If no passphrase is provided, the SSH key will default to having no passphrase. type: str version_added: "0.9" update_password: description: - C(always) will update passwords if they differ. - C(on_create) will only set the password for newly created users. type: str choices: [ always, on_create ] default: always version_added: "1.3" expires: description: - An expiry time for the user in epoch, it will be ignored on platforms that do not support this. - Currently supported on GNU/Linux, FreeBSD, and DragonFlyBSD. - Since Ansible 2.6 you can remove the expiry time specify a negative value. Currently supported on GNU/Linux and FreeBSD. type: float version_added: "1.9" password_lock: description: - Lock the password (C(usermod -L), C(usermod -U), C(pw lock)). - Implementation differs by platform. This option does not always mean the user cannot login using other methods. - This option does not disable the user, only lock the password. - This must be set to C(False) in order to unlock a currently locked password. The absence of this parameter will not unlock a password. - Currently supported on Linux, FreeBSD, DragonFlyBSD, NetBSD, OpenBSD. type: bool version_added: "2.6" local: description: - Forces the use of "local" command alternatives on platforms that implement it. - This is useful in environments that use centralized authentification when you want to manipulate the local users (i.e. it uses C(luseradd) instead of C(useradd)). - This will check C(/etc/passwd) for an existing account before invoking commands. If the local account database exists somewhere other than C(/etc/passwd), this setting will not work properly. - This requires that the above commands as well as C(/etc/passwd) must exist on the target host, otherwise it will be a fatal error. - Mutually exclusive with C(groups) and C(append) type: bool default: no version_added: "2.4" profile: description: - Sets the profile of the user. - Does nothing when used with other platforms. - Can set multiple profiles using comma separation. - To delete all the profiles, use C(profile=''). - Currently supported on Illumos/Solaris. type: str version_added: "2.8" authorization: description: - Sets the authorization of the user. - Does nothing when used with other platforms. - Can set multiple authorizations using comma separation. - To delete all authorizations, use C(authorization=''). - Currently supported on Illumos/Solaris. type: str version_added: "2.8" role: description: - Sets the role of the user. - Does nothing when used with other platforms. - Can set multiple roles using comma separation. - To delete all roles, use C(role=''). - Currently supported on Illumos/Solaris. type: str version_added: "2.8" notes: - There are specific requirements per platform on user management utilities. However they generally come pre-installed with the system and Ansible will require they are present at runtime. If they are not, a descriptive error message will be shown. - On SunOS platforms, the shadow file is backed up automatically since this module edits it directly. On other platforms, the shadow file is backed up by the underlying tools used by this module. - On macOS, this module uses C(dscl) to create, modify, and delete accounts. C(dseditgroup) is used to modify group membership. Accounts are hidden from the login window by modifying C(/Library/Preferences/com.apple.loginwindow.plist). - On FreeBSD, this module uses C(pw useradd) and C(chpass) to create, C(pw usermod) and C(chpass) to modify, C(pw userdel) remove, C(pw lock) to lock, and C(pw unlock) to unlock accounts. - On all other platforms, this module uses C(useradd) to create, C(usermod) to modify, and C(userdel) to remove accounts. seealso: - module: authorized_key - module: group - module: win_user author: - Stephen Fromm (@sfromm) s - name: Add the user 'johnd' with a specific uid and a primary group of 'admin' user: name: johnd comment: John Doe uid: 1040 group: admin - name: Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups user: name: james shell: /bin/bash groups: admins,developers append: yes - name: Remove the user 'johnd' user: name: johnd state: absent remove: yes - name: Create a 2048-bit SSH key for user jsmith in ~jsmith/.ssh/id_rsa user: name: jsmith generate_ssh_key: yes ssh_key_bits: 2048 ssh_key_file: .ssh/id_rsa - name: Added a consultant whose account you want to expire user: name: james18 shell: /bin/zsh groups: developers expires: 1422403387 - name: Starting at Ansible 2.6, modify user, remove expiry time user: name: james18 expires: -1 s append: description: Whether or not to append the user to groups returned: When state is 'present' and the user exists type: bool sample: True comment: description: Comment section from passwd file, usually the user name returned: When user exists type: str sample: Agent Smith create_home: description: Whether or not to create the home directory returned: When user does not exist and not check mode type: bool sample: True force: description: Whether or not a user account was forcibly deleted returned: When state is 'absent' and user exists type: bool sample: False group: description: Primary user group ID returned: When user exists type: int sample: 1001 groups: description: List of groups of which the user is a member returned: When C(groups) is not empty and C(state) is 'present' type: str sample: 'chrony,apache' home: description: "Path to user's home directory" returned: When C(state) is 'present' type: str sample: '/home/asmith' move_home: description: Whether or not to move an existing home directory returned: When C(state) is 'present' and user exists type: bool sample: False name: description: User account name returned: always type: str sample: asmith password: description: Masked value of the password returned: When C(state) is 'present' and C(password) is not empty type: str sample: 'NOT_LOGGING_PASSWORD' remove: description: Whether or not to remove the user account returned: When C(state) is 'absent' and user exists type: bool sample: True shell: description: User login shell returned: When C(state) is 'present' type: str sample: '/bin/bash' ssh_fingerprint: description: Fingerprint of generated SSH key returned: When C(generate_ssh_key) is C(True) type: str sample: '2048 SHA256:aYNHYcyVm87Igh0IMEDMbvW0QDlRQfE0aJugp684ko8 ansible-generated on host (RSA)' ssh_key_file: description: Path to generated SSH private key file returned: When C(generate_ssh_key) is C(True) type: str sample: /home/asmith/.ssh/id_rsa ssh_public_key: description: Generated SSH public key file returned: When C(generate_ssh_key) is C(True) type: str sample: > 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC95opt4SPEC06tOYsJQJIuN23BbLMGmYo8ysVZQc4h2DZE9ugbjWWGS1/pweUGjVstgzMkBEeBCByaEf/RJKNecKRPeGd2Bw9DCj/bn5Z6rGfNENKBmo 618mUJBvdlEgea96QGjOwSB7/gmonduC7gsWDMNcOdSE3wJMTim4lddiBx4RgC9yXsJ6Tkz9BHD73MXPpT5ETnse+A3fw3IGVSjaueVnlUyUmOBf7fzmZbhlFVXf2Zi2rFTXqvbdGHKkzpw1U8eB8xFPP7y d5u1u0e6Acju/8aZ/l17IDFiLke5IzlqIMRTEbDwLNeO84YQKWTm9fODHzhYe0yvxqLiK07 ansible-generated on host' stderr: description: Standard error from running commands returned: When stderr is returned by a command that is run type: str sample: Group wheels does not exist stdout: description: Standard output from running commands returned: When standard output is returned by the command that is run type: str sample: system: description: Whether or not the account is a system account returned: When C(system) is passed to the module and the account does not exist type: bool sample: True uid: description: User ID of the user account returned: When C(UID) is passed to the module type: int sample: 1044 N(tdistro(tload_platform_subclasst AnsibleModule(tto_bytest to_nativetto_texts[^a-zA-Z0-9./=]tUsercB`s:eZdZdZd"ZdZdZdZdZ dZ dZ dZ d Z ed"ed Zd Zd Zd ZdZdZdZdZedZedZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%d Z&d!Z'RS(#s| This is a generic User manipulation class that is subclassed based on platform. A subclass may wish to override the following action methods:- - create_user() - remove_user() - modify_user() - ssh_key_gen() - ssh_key_fingerprint() - user_exists() All subclasses MUST define platform and distribution (which may be None). tGenerics /etc/passwds /etc/shadowis/etc/login.defss%Y-%m-%dcO`stt||S(N(R R(tclstargstkwargs((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt__new__scC`s||_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_ |jd |_ |jd |_ |jd |_ |jd |_ |jd |_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_|jd|_d|_|jd|_d|_|jd|_|jd|_ |jd|_!|jd|_"|jddk r*d j#|jd|_n|jd!dk ryt$j%|jd!|_Wqt&k r}|j'd"d#|jt(|fqXn|jd$dk r|jd$|_)nt*j+j#d%d&|j|_)dS('Ntstatetnametuidthiddent non_uniquetseusertgrouptcommenttshelltpasswordtforcetremovet create_homet move_hometskeletontsystemt login_classtappendtgenerate_ssh_keyt ssh_key_bitst ssh_key_typetssh_key_commenttssh_key_passphrasetupdate_passwordthomet password_locktlocaltprofilet authorizationtroletgroupst,texpirestmsgs"Invalid value for 'expires' %s: %st ssh_key_files.sshsid_%s(,tmoduletparamsRRRRRRRRRRRRR R!R"R#R$R%t sshkeygentssh_bitstssh_typet ssh_commenttssh_passphraseR+R,tNoneR4R-R2R.R/R0R1tjointtimetgmtimet Exceptiont fail_jsonR tssh_filetostpath(tselfR7te((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt__init__sV   *c`sjjdrjdkrt}jjdtdddgkrSt}n'tfddDrxt}ndjjdkrt}njjdjd}t|d krtt t j |d rt}n|d d krt|d d krt}n|d dkrBt|d dkrBt}n|d dkrzt|d dkrzt}qznt}|rjj dqndS(NRtDarwint*t!s *************c3`s%|]}|jjdkVqdS(RN(R7R8(t.0tchar(RG(s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pys ss:*!t$iiit1it5i+t6iVsThe input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.( R7R8tplatformtFalsetsettanytTruetsplittlentboolt_HASH_REtsearchtwarn(RGt maybe_invalidtfields((RGs?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytcheck_password_encrypteds*%    & & & cC`si|jjr*|r*|jjd|dSg|D]}t|^q1}|jj|d|d|SdS(Ns#In check mode, would have run: "%s"ittuse_unsafe_shelltdata(iRaRa(R7t check_modetdebugtstrt run_command(RGtcmdRbRctobey_checkmodetx((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytexecute_command&s cC`s-|jj r)|jr)|jj|jSdS(N(R7Rdt SHADOWFILEt backup_local(RG((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt backup_shadow/scC`s|jrd}nd}|jj|tg}|jrI|jdn|jrb|jdn|j|j|j|S(Ntluserdeltuserdels-fs-r( R.R7t get_bin_pathRWRR%RRRk(RGt command_nameRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytremove_user_userdel3s    c C`sw|jr'd}|jjdt}nd}|jj|tg}|jdk r|jd|j|j|jr|jdqn|jdk r|jd|j|jn|j dk r|j |j s|jj dd|j n|jd |j|j n|j |j r t jjd rtjd t}t|d jd d}|dkr|jdq|jdq t jjdrtjd t}t|d jd d}|dkr|jdqq |jdn|jdk rc|j rct|jrc|j}|jd|jdj|n|jdk r|jd|j|jn|jdk r|jrt jj|j}t jj|s|j|jqn|jd|j|jn|jdk r6|jd|j|jn|j dk r|j r|jd|j t!j"dkr|jdq|jt!j#|j$|j n|j%dk r|jd|j&r|jd|j%q|j|j%n|jrI|js|jdn|j'dk rV|jd|j|j'qVn |jd|j(ro|jd n|j|j |j)|\}} } |j s|dkr|| | fS|j dk rj|j t!j"dkrd!} n#tt*j+|jj,d"d#} |j)|d$t-| |j g\}} } | | 7} | | 7} |dkrj|| | fSn|| | fS(%Ntluseraddtlchagetuseradds-us-os-ZR5sGroup %s does not exists-gs/etc/redhat-releasetfull_distribution_nameit.iis-ns-Ns/etc/SuSE-releasei s-GR3s-cs-ds-ss-eRas-ps!%ss-ms-ks-Ms-riR4iQs-E(.R.R7RqRWRR>R%RRRt group_existsRCRRERFtexistsRtlinux_distributionRTtintRXR2RYtget_groups_setR?RR,R tdirnametisdirtcreate_homedirRR4R@RAtstrftimet DATE_FORMATRR-R"R#RktmathtfloorR8R (RGRrt lchage_cmdRhtdistt major_releaseR2tparenttrctoutterrtlexpirest_outt_err((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytcreate_user_useraddBs       (       "         #-   c C`s|jrd}nd}|jj|t}tj|tjsFtS|dg}|j|dt\}}}||}t |j d}x'|D]} | j j drtSqWtS(Ntlusermodtusermods--helpRis s -a, --append( R.R7RqRWREtaccesstX_OKRTRkR RXtstript startswith( RGRrt usermod_pathRhRtdata1tdata2thelpouttlinestline((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt_check_usermod_appends     cC`s{|jr-d}|jjdt}d}nd}|jj|tg}|j}|j}|jdk r|dt|jkr|j d|j |j|j r|j dqn|j dk rK|j |j s|jj dd|j n|j|j }|d |dkrK|j d |j |j qKn|jdk r|jd t}t} g} |jd kr|r"|j r"t} q"n|jd t} t|j| } | r"|j rxC| D]2} | | kr|r|j dnt} PqqWq"t} n| r|j r|j rh| rh|j d|j dj| q|j d|j dj| qn|jdk r|d|jkr|j d|j |jn|jdk r.|d|jkr.|j d|j |j|jr.|j dq.n|jdk rp|d|jkrp|j d|j |jn|jdk rt|jd} |jtjdkr| dkr|jrd}q|j d|j d qqtj| d}| dks!|d |jd kr|jrPttj|jj dd}q|j d|j tj!|j"|jqn|j#r|dj$d r|j d n2|j#tkr|dj$dr|j d!n|j%d"kr|j&dk r|dj'd|j&j'dkrg|D]}|d&kr+|^q+}|j d#|j#rv|j d$|j&q|j |j&nd'\}}}t(|dkr|j |j)|j*|\}}}n|j s|dkp|dk r|||fS|dk rn|j*|d%t+||j)g\}}}||7}||7}|dkrn|||fSn|||fS((NRRuRis-us-oR5sGroup %s does not existis-gtexclude_primaryRatremove_existings-as-AR3s-Gis-cis-ds-mis-siiis-eiQR4RLs-Ls-Utalwayss-ps!%ss-E(s-Us-L(NRaRa(,R.R7RqRWR>t user_infoRRR|R%RRRyRCt group_infoR2tuser_group_membershipRTR}RUtsymmetric_differenceR?RR,R!RR4t user_passwordR@RARRR8RRR-RR+RtlstripRYRRkR (RGRrRRRhtinfot has_appendtginfotcurrent_groupstgroups_need_modR2t group_difftgtcurrent_expirestcurrent_expire_datetcRRRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytmodify_user_usermods    (           " "  "     # & %"C%  #  -   cC`scytjt|tSWnAttfk r^ytj|tSWq_tk rZtSXnXdS(N(tgrptgetgrgidR|RWt ValueErrortKeyErrortgetgrnamRT(RGR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRyYs  cC`s^|j|stSyttjt|SWn'ttfk rYttj|SXdS(N( RyRTtlistRRR|RRR(RGR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRes cC`s|jdkrdS|j}td|jjdD}xv|jD]h}|j|s}|jjdd|n|rN|rN|j |d|dkrN|j |qNqNW|S(Ncs`s!|]}|r|jVqdS(N(R(RMRj((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pys rsR3R5sGroup %s does not existii( R2R>RRURXtcopyRyR7RCRR(RGRRR2R((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR}ns ")cC`sg}|j}xjtjD]\}|j|jkr|sQ|j|dq{|d|jkr{|j|dq{qqW|S(s- Return a list of groups the user belongs to ii(t get_pwd_infoRtgetgrallRtgr_memR%tgr_gid(RGRR2RR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRzs cC`s$|jrtjj|js@|jjddj|jnt}dj|j }t |jdP}|j ddd}x-|D]%}|j t |rt}PqqWWdQX|s|jjdjd|jd|j n|Sytj|j r tSWntk rtSXdS( NR5sK'local: true' specified but unable to find local account file {0} to parse.s{0}:trbis'local: true' specified and user '{name}' was not found in {file}. The local user account may already exist if the local account database exists somewhere other than {file}.tfileR(R.RERFRzt PASSWORDFILER7RCtformatRTRtopent readlinesRR RWR]tpwdtgetpwnamR(RGRzt name_testtftreversed_linesR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt user_existss* "    cC`s&|jstSttj|jS(N(RRTRRRR(RG((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRs cC`sc|jstS|j}t|ddksHt|ddkr_|jd|dRRBR RERFR~RzR7RdtmkdirR|tchownRRRqRWR%R;R:R<R=RetptytopenptytenvironRt subprocesstPopenR tsetsidtpolltselecttreadtwritet returncodeRk(RGRt overwriteR6RHtssh_dirRht master_in_fdt slave_in_fdt master_out_fdt slave_out_fdt master_err_fdt slave_err_fdRRtpt out_buffert err_bufferRtwt first_promptt second_prompttprompttfdtchunkRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt ssh_key_gens  !         %  '    #   #      "cC`s|j}tjj|s/dd|dfS|jjdtg}|jd|jd|j||j|dt S(NisSSH Key file %s does not existRas ssh-keygens-ls-fRi( RRERFRzR7RqRWR%RkRT(RGR6Rh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytssh_key_fingerprint@s    cC`sWd|j}y.t|d}|jj}WdQXWntk rRdSX|S(Ns%s.pubR(RRRRtIOErrorR>(RGtssh_public_key_fileRtssh_public_key((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytget_ssh_public_keyKs cC`s |jS(N(R(RG((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt create_userTscC`s |jS(N(Rs(RG((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt remove_userXscC`s |jS(N(R(RG((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt modify_user\sc C`stjj|s|jdk r-|j}nd}tjj|rytj||dtWqtk r}|j j dtddt |qXnJytj |Wn6tk r}|j j dtddt |nXtjj|j rt|j d}x|D]}tjd|}|rt|jdd }d |@}ytj||Wqtk r}|j j dtddt |qXqqWWdQXqndS( Ns /etc/skeltsymlinkstfailedR5s%sRs^UMASK\s+(\d+)$iii(RERFRzR"R>tshutiltcopytreeRWRR7t exit_jsonR tmakedirst LOGIN_DEFSRtretmatchR|Rtchmod( RGRFR"RHRRtmtumasktmode((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR`s0 *'  c C`sytj|||xtj|D]u\}}}x0|D](}tjtjj||||q<Wx0|D](}tjtjj||||qoWq&WWn6tk r} |jjdtddt | nXdS(NR R5s%s( RERtwalkRFR?RR7R RWR ( RGRtgidRFtroottdirstfilestdRRH((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt chown_homedir~s & .N((t__name__t __module__t__doc__RSR>t distributionRRlRRRRRIR`RTRWRkRnRsRRRRyRR}RRRRRRRRRRRRRRR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRsF  1 $   v   !    [    t FreeBsdUsercB`sPeZdZdZd ZdZdZdZdZ dZ dZ dZ RS( s1 This is a FreeBSD User manipulation class - it uses the pw command to manipulate the user database, followed by the chpass command to change the password. This overrides the following methods from the generic class:- - create_user() - remove_user() - modify_user() tFreeBSDs/etc/master.passwdis%d-%b-%YcC`s;|j}|jr|djd r|jjdtd|jg}|jdk r|dt |jkr|j d|j |jn|j |S|jt kr7|djdr7|jjdtd|jg}|jdk r*|dt |jkr*|j d|j |jn|j |Sd S( Nis*LOCKED*tpwtlockis-utunlockRa(NRaRa( RR-RR7RqRWRRR>R|R%RkRT(RGRRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt _handle_locks$  (  " (  cC`sJ|jjdtdd|jg}|jr=|jdn|j|S(NR#Rps-ns-r(R7RqRWRRR%Rk(RGRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRs  c C`s|jjdtdd|jg}|jdk rl|jd|j|j|jrl|jdqln|jdk r|jd|j|jn|j dk r|jd|j|j n|j dk r(|j |j s|jj dd |j n|jd |j|j n|j dk ri|j}|jd |jd j|n|jr|jd |jdk r|jd|j|jqn|jdk r|jd|j|jn|jdk r|jd|j|jn|jdk ru|jd|jtjdkrS|jdqu|jttj|jn|j|\}}}|dk r|dkr|jj d|jd|d|n|jdk rD|jjdtd|j|jg}|j|\}}}|dkr-|}n||7}||7}n|j\}}}|dkrn|}n||7}||7}|||fS(NR#Rvs-ns-us-os-cs-dR5sGroup %s does not exists-gs-GR3s-ms-ks-ss-Ls-eit0RRtchpasss-p(R7RqRWRRR>R%RRR,RRyRCR2R}R?R R"RR$R4R@RARftcalendarttimegmRkRR&( RGRhR2RRRt_rcRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRsv              "%         cC`s^|jjdtdd|jg}t|}|j}|jdk r|dt|jkr|j d|j |j|j r|j dqn|j dk r|d|j kr|j d|j |j n|j dk r|d |j kr |j s)tjj|j  r9|jr9|j d n|d |j krl|j d |j |j n|jdk r|j d |j |jqn|jdk r%|j|js|jjd d|jn|j|j}|d|dkr%|j d|j |jq%n|jdk rg|d|jkrg|j d|j |jn|jdk r6d}tjj|jrtj|jtjrt|jdD}x:|D]2}|jd|jr|jdd}qqWWdQXn|j|kr6|j d|j |jq6n|jdk r |j }|j!} t"|j#| } t$} | r|j rx-| D]} | | krt} PqqWqt} n| r |j d| } |j r| t"|B} n|j dj%| q n|j&dk rt|j'd}|j&t(j)dkrt|dkr|j d|j dqqt(j)|}|dks|d |j&d kr|j d|j t*t+j,|j&qnd$\}}}|t|kre|j-|\}}}||7}||7}|dk re|dkre|jjd|jd |d|qen|j.d kr|j/dk r|dj0d!|j/j0d!kr|jjd"td#|j/|jg}|j-|\}}}|dkr|}n||7}||7}n|j1\}}}|dkr=|}n||7}||7}|||fS(%NR#Rs-nis-us-ois-cis-ms-ds-kR5sGroup %s does not existis-gis-sRs%s:Rs-Ls-GR3iis-eR'RaRRRs*LOCKED*R(s-p(NRaRa(2R7RqRWRRYRRR>R|R%RRR,R!RERFRzR R"RRyRCRRR$RlRRRRRXR2RR}RURRTR?R4RR@RARfR)R*RkR+RRR&(RGRhtcmd_lenRRtuser_login_classRRRR2RRRt new_groupsRRRRRRRR+((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRs   (  " ;   " - #            # %  (C         N( RRRRSR>R RlRRR&RRR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR!s   VtDragonFlyBsdUsercB`seZdZdZRS(s This is a DragonFlyBSD User manipulation class - it inherits the FreeBsdUser class behaviors, such as using the pw command to manipulate the user database, followed by the chpass command to change the password. t DragonFly(RRRRS(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR/st OpenBSDUsercB`s;eZdZdZdZdZdZdZdZ RS(s, This is a OpenBSD User manipulation class. Main differences are that OpenBSD:- - has no concept of "system" account. - has no force delete user This overrides the following methods from the generic class:- - create_user() - remove_user() - modify_user() tOpenBSDs/etc/master.passwdcC`s^|jjdtg}|jdk r`|jd|j|j|jr`|jdq`n|jdk r|j|js|jj dd|jn|jd|j|jn|j dk r|j }|jd|jdj |n|j dk r.|jd |j|j n|jdk r]|jd |j|jn|jdk r|jd |j|jn|jdk r|jd |j|jn|jdk r|jd kr|jd|j|jn|jrA|jd|jdk rA|jd|j|jqAn|j|j|j|S(NRvs-us-oR5sGroup %s does not exists-gs-GR3s-cs-ds-ss-LRKs-ps-ms-k(R7RqRWRR>R%RRRyRCR2R}R?RR,RR$RR R"RRk(RGRhR2((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRsJ             cC`sN|jjdtg}|jr1|jdn|j|j|j|S(NRps-r(R7RqRWRR%RRk(RGRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRss  c C`s|jjdtg}|j}|jdk r|dt|jkr|jd|j|j|jr|jdqn|j dk r |j |j s|jj dd|j n|j |j }|d|dkr |jd|j|j q n|j dk r|j}t}d }g}|j d krd|r|j rt}qni|j}t|j|}|r|jrx3|D]"} | |krd }t}PqqWqt}n|r|j||jd j|qn|jdk r>|d |jkr>|jd|j|jn|jdk r|d|jkr|jry|jdn|jd|j|jn|jdk r|d|jkr|jd|j|jn|jdk rd} |jjdt|jg} |j| dt\} } }xO| jD]A}|j}|ddkr9t|dkr9|d} q9q9W|j| kr|jd|j|jqn|jr|djd r|jdn2|jtkr|djdr|jdn|j dkro|j!dk ro|j!dkro|d|j!kro|jd|j|j!nt|dkrdS|j|j|j|S( NRis-us-oR5sGroup %s does not existis-gs-SRas-GR3is-cis-ms-dis-stuserinfoRiitclassis-LRKs-Zs-URs-p(NRaRa("R7RqRWRRR>R|R%RRRyRCRR2RRTR}RURR?RR,R!RR$RRkt splitlinesRXRYR-RR+R(RGRhRRRRt groups_optionR2RRR-t userinfo_cmdRRRRttokens((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRs (            " "  "  " "" N( RRRRSR>R RlRRsR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR1s  3 t NetBSDUsercB`s;eZdZdZdZdZdZdZdZ RS(s+ This is a NetBSD User manipulation class. Main differences are that NetBSD:- - has no concept of "system" account. - has no force delete user This overrides the following methods from the generic class:- - create_user() - remove_user() - modify_user() tNetBSDs/etc/master.passwdcC`s|jjdtg}|jdk r`|jd|j|j|jr`|jdq`n|jdk r|j|js|jj dd|jn|jd|j|jn|j dk r1|j }t |dkr |jj ddt |n|jd |jd j |n|jdk r`|jd |j|jn|jdk r|jd |j|jn|jdk r|jd |j|jn|jdk r|jd|j|jn|jdk r|jd|j|jn|jrd|jd|jdk rd|jd|j|jqdn|j|j|j|S(NRvs-us-oR5sGroup %s does not exists-gis.Too many groups (%d) NetBSD allows for 16 max.s-GR3s-cs-ds-ss-Ls-ps-ms-k(R7RqRWRR>R%RRRyRCR2R}RYR?RR,RR$RR R"RRk(RGRhR2((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRgsN              cC`sN|jjdtg}|jr1|jdn|j|j|j|S(NRps-r(R7RqRWRR%RRk(RGRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRss  c C`s(|jjdtg}|j}|jdk r|dt|jkr|jd|j|j|jr|jdqn|j dk r |j |j s|jj dd|j n|j |j }|d|dkr |jd|j|j q n|j dk r7|j}t}g}|j d kr^|r|j rt}qnx|j}t|j|}|r|jrxB|D]1}||krt|j|}t}PqqWqt}n|r7t|d kr|jj dd t|n|jd |jd j|q7n|jdk ry|d|jkry|jd|j|jn|jdk r|d|jkr|jr|jdn|jd|j|jn|jdk r|d|jkr|jd|j|jn|jdk rE|jd|j|jn|jdkr|jdk r|d|jkr|jd|j|jn|jr|djd r|jdn2|jtkr|djdr|jdnt|dkr dS|j|j|j |S(NRis-us-oR5sGroup %s does not existis-gRais.Too many groups (%d) NetBSD allows for 16 max.s-GR3is-cis-ms-dis-ss-LRis-ps*LOCKED*s-C yess-C no(NRaRa(!R7RqRWRRR>R|R%RRRyRCRR2RRTR}RURtunionRYR?RR,R!RR$R+RR-RRRk( RGRhRRRRR2RR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRsz (             " "  "  1 "N( RRRRSR>R RlRRsR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR9Us  5 tSunOScB`s\eZdZdZd ZdZdZdZdZ dZ dZ dZ d Z RS( s This is a SunOS User manipulation class - The main difference between this class and the generic user class is that Solaris-type distros don't support the concept of a "system" account and we need to edit the /etc/shadow file manually to set a password. (Ugh) This overrides the following methods from the generic class:- - create_user() - remove_user() - modify_user() - user_info() R<s /etc/shadows/etc/user_attrc C`sEyd}d}d}tdd}x|D]}|j}|jds.|dkraq.ntjd|}|r|jd}n|jd\}}|dkr|jd }q.|d kr|jd }q.|d kr.|jd }q.q.WWdQXWn0tk r7} |j j d d t | nX|||fS(NRas/etc/default/passwdRt#s^([^#]*)#(.*)$it=tMINWEEKSs tMAXWEEKSt WARNWEEKSR5s&failed to read /etc/default/passwd: %s( RRRRRRRXtrstripRBR7RCR ( RGtminweekstmaxweekst warnweeksRRRtkeytvalueR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytget_password_defaultss,      !cC`sN|jjdtg}|jr1|jdn|j|j|j|S(NRps-r(R7RqRWRR%RRk(RGRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR"s  c C`s|jjdtg}|jdk r`|jd|j|j|jr`|jdq`n|jdk r|j|js|jj dd|jn|jd|j|jn|j dk r|j }|jd|jdj |n|j dk r.|jd |j|j n|jdk r]|jd |j|jn|jdk r|jd |j|jn|jr|jd |jdk r|jd |j|jqn|jdk r|jd|j|jn|jdk r2|jd|j|jn|jdk ra|jd|j|jn|j|j|j|\}}}|dk r|dkr|jj d|jd|d|n|jjs|jdk r|j|j\}}}yg} t|jdc} xY| D]Q} t| dd} | jjd} | d|jksx| j| q%n|j| dR%RRRyRCR2R}R?RR,RR R"R/R0R1RRkRdRRnRHRRlR RRXRfR|R@Rt writelinesRB( RGRhR2RRRRCRDRERRRR_((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR*s              %         'cC`s0|jjdtg}t|}|j}|jdk r|dt|jkr|jd|j|j|j r|jdqn|j dk r|j |j s|jj dd|j n|j |j }|d|dkr|jd|j|j qn|jdk r|j}|j}t|j|}t}|r|jrx-|D]} | |krpt}PqpqpWqt}n|r|jd |} |jr| j|n|jd j| qn|jdk r,|d |jkr,|jd |j|jn|jdk r|d |jkr|jrg|jdn|jd|j|jn|jdk r|d|jkr|jd|j|jn|jdk r |d|jkr |jd|j|jn|jdk rM|d|jkrM|jd|j|jn|jdk r|d|jkr|jd|j|jn|t|kr |j|j|j|\} } } | dk r| dkr|jj d|jd| d| qnd&\} } } |jdkr#|j dk r#|d|j kr#|j!d'\} } } |jj"s#|j#\}}}ygg}t$|j%d}x|D] }t&|dd }|j'j(d!}|d|jks|j|qn|j |dR|R%RRRyRCRR2RR}RURRTtupdateR?RR,R!RR/R0R1RRkR+RRnRdRHRRlR RRXRfR@RJRB(RGRhR,RRRR2RRRR.RRRRCRDRERRRR_((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRs  (            " "  " " " " (1       'cC`s2tt|j}|r.||j7}n|S(N(tsuperR<Rt_user_attr_info(RGR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRsc C`sdgd}t|jd}x|D]}|jjd}|d|jkr)td|djdD}|jd d|d<|jd d|d<|jd d|d N(RX(RMRj((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pys sit;tprofilestauthstrolesi(Rt USER_ATTRRRXRtdicttget(RGRt file_handlerRRttmp((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRMs  ##N(RRRRSR>R RlRRRHRRRRRM(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR<s    e n t DarwinUsercB`seZdZdZdZdZdZdd d!d"d#d$gZdZ dZ dZ dZ ddZ dZdZdZdZdZdZdZddZdZRS(%s This is a Darwin macOS User manipulation class. Main differences are that Darwin:- - Handles accounts in a database managed by dscl(1) - Has no useradd/groupadd - Does not create home directories - User password must be cleartext - UID must be given - System users must ben under 500 This overrides the following methods from the generic class:- - user_exists() - create_user() - remove_user() - modify_user() RJRxRtRealNameR,tNFSHomeDirectoryRt UserShellRtUniqueIDRtPrimaryGroupIDRtIsHiddencC`stt|j||jdkr=|jr[d|_q[n|jrRd|_n d|_|jdk r}|jjdndS(NiiRR](shiddenR](RLRWRIRR>R#R_R%(RGR7((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRI0s    cC`s|jjdt|jgS(Ntdscl(R7RqRWtdscl_directory(RG((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt _get_dsclAscC`s|j}|ddd|jg7}|j|dt\}}}g}xO|jD]A}|jdsV|jdrqVn|j|jdqVW|S(Ns-searchs/GroupstGroupMembershipRit t)i(R`RRkRTR5RR%RX(RGRhRRRR2R((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt_list_user_groupsDs cC`s|j}|dd|j|g7}|j|dt\}}}|dkrTd S|j}t|dkr|djddSt|dkrdj|dj g|dSt|dkr|dj Sd Sd S( sCReturn user PROPERTY as given my dscl(1) read or None if not found.s-reads /Users/%sRiiis: is N( R`RRkRTR>R5RYRXR?R(RGtpropertyRhRRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt_get_user_propertyOs   "c C`s|j}|dddg7}|j|dt\}}}|dkrq|jjddd|d |d |nd}d}xc|jD]U}t|jd d } || kr| }n|| kr| d kr| }qqW|r d|kodknr |dS|dS(sv Return the next available uid. If system=True, then uid should be below of 500, if possible. s-lists/UsersR[RiiR5s$Unable to get the next available uidRRRRbiiii(R`RkRTR7RCR5R|RX( RGR#RhRRRtmax_uidtmax_system_uidRt current_uid((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt _get_next_uidfs(       "c C`s|j}|jr5|dd|j|jg7}n|dd|jddg7}|j|\}}}|dkr|jjddd |d |d |n|||fS( ssChange password for SELF.NAME against SELF.PASSWORD. Please note that password must be cleartext. s-passwds /Users/%ss-createtPasswordRKiR5sError when changing passwordRRR(R`RRRkR7RC(RGRhRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt_change_user_passwords    (cC`s{|jdkrd|_nytj|jj|_Wn+tk rd|jjdd|jnXt|j|_dS(sDConvert SELF.GROUP to is stringed numerical value suitable for dscl.tnogroupR5sBGroup "%s" not found. Try to create it first using "group" module.N( RR>RRRRR7RCRf(RG((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt_make_group_numericals  c C`s|dkrd}nd}ddd||jdd|g}|j|\}}}|d kr|jjd d ||j|fd |d |d|n|||fS(sAdd or remove SELF.NAME to or from GROUP depending on ACTION. ACTION can be 'add' or 'remove' otherwise 'remove' is assumed. tadds-as-dt dseditgroups-otedits-ttuseriR5s"Cannot %s user "%s" to group "%s".RRR(RRkR7RC(RGRtactiontoptionRhRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt__modify_groups  ! )c C`s*d}d}d}t}t|j}|jdk rTt|jjd}n tg}|jtkrxT||D]E}|j|d\}} } ||7}|| 7}|| 7}t}qzWnxQ||D]E} |j| d\}} } ||7}|| 7}|| 7}t}qW||||fS(sAdd or remove SELF.NAME to or from GROUP depending on ACTION. ACTION can be 'add' or 'remove' otherwise 'remove' is assumed. iRaR3tdeleteRoN( RTRURdR2R>RXR%t_DarwinUser__modify_groupRW( RGRRRtchangedtcurrentttargetRR+RRRo((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt _modify_groups,         c C`sd}dd|dg}|j|dt\}}}g}x_|jdd!D]J}y|jdd}Wntk r|j}nX|j|qPW|jr+|j|krdd |dd |jg}|j|\}}}|d kr$|j j d d |jd|d|d|nd Sn|j|kr||j |j=dd |ddg|}|j|\}}}|d kr|j j d d|jd|d|d|nd SdS(svHide or show user on login window according SELF.SYSTEM. Returns 0 if a change has been made, None otherwise.s0/Library/Preferences/com.apple.loginwindow.plisttdefaultsRtHiddenUsersListRiiit"Rs -array-addiR5s%Cannot user "%s" to hidden user list.RRRs-arrays.Cannot remove user "%s" from hidden user list.N( RkRTR5RXt IndexErrorRR%R#RR7RCtindex(RGt plist_fileRhRRRt hidden_usersRj((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyt_update_system_users0   / /cC`sK|j}|dd|jg7}|j|dt\}}}|dkS(s1Check is SELF.NAME is a known user on the system.s-lists /Users/%sRii(R`RRkRT(RGRhRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRs c C`s|j}|j}|dd|jg7}|j|\}}}|dkr|jjdd|jd|d|d|n|jrtjj |d rt j |d |d |d 7}qn|||fS( sCDelete SELF.NAME. If SELF.FORCE is true, remove its home directory.s-deletes /Users/%siR5sCannot delete user "%s".RRRis Removed %s( RR`RRkR7RCRRERFRzR trmtree(RGRRhRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR s   / R^c C`s|j}|dd|jg7}|j|\}}}|dkrv|jjdd|jd|d|d|n|j|jdkrt|j |j |_n|j r:|j dkrd|j|_ n|jj s:tjj|j s tj|j n|jt|jt|j|j q:n|j r_|jdkr_d |_nx|jD]}|d|jkri|j|dri|j}|dd|j|d |j|dg7}|j|\}}}|dkr(|jjdd |d|jfd|d|d|n||7}||7}|dkrX|||fSqiqiW|j\}}}||7}||7}|j|jr|j\}}}} ||7}||7}n|||fS( Ns-creates /Users/%siR5sCannot create user "%s".RRRs /bin/bashis&Cannot add property "%s" to user "%s".(R`RRkR7RCRnRR>RfRjR#R R,RdRERFRzRRR|RRR_t__dict__RlRR2R{( RGRrRhRRRtfieldRRRx((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR sJ  /   . $ , 9         c C`sd}d}d}|jr(|jnx&|jD]}|d|jkr2|j|dr2|j|d}|dks|t|j|dkrM|j}|dd|j|d|j|dg7}|j |\}}} |dkr-|j j dd|d|jfd|d |d |n|}||7}|| 7}qMq2q2W|j d kr|j dk r|j\}}} ||7}|| 7}|}n|jr|j\}}} } ||7}|| 7}| tkr|}qn|j}|dkr|}n|||fS( NRaiis-creates /Users/%sR5s*Cannot update property "%s" for user "%s".RRRR(R>RRnR_RRfR R`RRkR7RCR+RRlR2R{RWR( RGRxRRRRyRhRRRt_changed((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRH sD  $) ,  *            N(scommentRX(shomeRY(sshellRZ(suidsUniqueID(sgroupR\(shiddensIsHidden(RRRRSR>R RlR_R_RIR`RdRfRjRlRnRwR{RRRRR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRWs2        )   4tAIXcB`sGeZdZdZdZdZdZddZdZ dZ RS( s This is a AIX User manipulation class. This overrides the following methods from the generic class:- - create_user() - remove_user() - modify_user() - parse_shadow_file() Rs/etc/security/passwdcC`sN|jjdtg}|jr1|jdn|j|j|j|S(NRps-r(R7RqRWRR%RRk(RGRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR s  RvcC`sp|jj|tg}|jdk rG|jd|j|jn|jdk r|j|js|jjdd|jn|jd|j|jn|j dk rt |j r|j }|jd|jdj |n|j dk r$|jd|j|j n|jdk rS|jd|j|jn|jdk r|jd |j|jn|jr|jd |jdk r|jd |j|jqn|j|j|j|\}}}|jdk rcg}|j|jjd t|jd |jd|j|dd|j|jfn|||fS(Ns-uR5sGroup %s does not exists-gs-GR3s-cs-ds-ss-ms-ktchpasswds-eRcs%s:%s(R7RqRWRR>R%RRyRCR2RYR}R?RR,RR R"RRkR(RGRrRhR2RRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR sH            &c C`s|jjdtg}|j}|jdk rl|dt|jkrl|jd|j|jn|jdk r|j |js|jj dd|jn|j |j}|d|dkr|jd|j|jqn|j dk r|j }t}g}|j dkrE|r|j rt}qnc|j}t|j|}|r|jrx-|D]}||kr|t}Pq|q|Wqt}n|r|jd |jd j|qn|jdk r|d |jkr|jd |j|jn|jdk rt|d |jkrt|jrT|jdn|jd|j|jn|jdk r|d|jkr|jd|j|jnt|dkrd\} } } n(|j|j|j|\} } } |jdkr|jdk r|d|jkrg}|j|jjdt|jd|jd |j|dd|j|jf\} } }nd\} } }| dk r| | | | |fS| | | | |fSdS(NRis-uR5sGroup %s does not existis-gRas-GR3is-cis-ms-dis-siRRs-eRcs%s:%s(NRaRa(NRaRa(R7RqRWRRR>R|R%RRyRCRR2RRTR}RURR?RR,R!RRYRRkR+R(RGRhRRRRR2RRRRRtrc2tout2terr2((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR sp (           " "  " 1  1 c C`s~t|j}d}d}tjj|jrVtj|jtjrVt|jd}|j }WdQXd}d}yxMt |D]?\}} | j d|r||d}||d}PqqWd|kr|j dddj }nd|kr$|j dddj }nWqVtk rR|jjd d |jqVXnt|} t|pqd} | | fS( sExample AIX shadowfile data: nobody: password = * operator1: password = {ssha512}06$xxxxxxxxxxxx.... lastupdate = 1549558094 test1: password = * lastupdate = 1553695126 RaRNs%s:iis = iR5sFailed to parse shadow file %s(R RRERFRzRlRRRRt enumerateRRXRRR7RCR ( RGtb_nametb_passwdt b_expirestbftb_linest b_passwd_linetb_expires_lineRtb_lineRR4((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR s.-  # ! N( RRRRSR>R RlRRRR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRs s   2 MtHPUXcB`s;eZdZdZdZdZdZdZdZ RS(s This is a HP-UX User manipulation class. This overrides the following methods from the generic class:- - create_user() - remove_user() - modify_user() sHP-UXs /etc/shadowcC`sdg}|jdk rQ|jd|j|j|jrQ|jdqQn|jdk r|j|js|jjdd|jn|jd|j|jn|jdk rt |jr|j }|jd|jdj |n|j dk r.|jd |j|j n|j dk r]|jd |j|j n|jdk r|jd |j|jn|jdk r|jd |j|jn|jr|jd n |jd|jr|jdn|j|j|j|S(Ns/usr/sam/lbin/useradd.sams-us-oR5sGroup %s does not exists-gs-GR3s-cs-ds-ss-ps-ms-Ms-r(RR>R%RRRyR7RCR2RYR}R?RR,RRR R#RRk(RGRhR2((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRF sD             cC`sXdg}|jr"|jdn|jr;|jdn|j|j|j|S(Ns/usr/sam/lbin/userdel.sams-Fs-r(RR%RRRk(RGRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRv s   c C`sydg}|j}|jdk rv|dt|jkrv|jd|j|j|jrv|jdqvn|jdk r|j|js|jj dd|jn|j |j}|d|dkr|jd|j|jqn|j dk r |j }t }g}|j d krO|r|j rt}qni|jd t }t|j|}|r|jrx-|D]}||krt}PqqWqt}n|r |jd |} |jr|t|B} n|jd j| q n|jdk rK|d |jkrK|jd|j|jn|jdk r|d|jkr|jd|j|j|jr|jdqn|jdk r|d|jkr|jd|j|jn|jdkrF|jdk rF|d|jkrF|jd|jd|j|jnt|dkr\dS|j|j|j|S(Ns/usr/sam/lbin/usermod.samis-us-oR5sGroup %s does not existis-gRaRs-GR3is-cis-ds-mis-sRis-Fs-p(NRaRa(RRR>R|R%RRRyR7RCRR2RRTRWR}RURR?RR,R!RR+RRYRRk( RGRhRRRRR2RRR.((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR sn  (            " "  " 1  N( RRRRSR>R RlRRR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR8 s 0 tBusyBoxcB`s)eZdZdZdZdZRS(s This is the BusyBox class for use on systems that have adduser, deluser, and delgroup commands. It overrides the following methods: - create_user() - remove_user() - modify_user() c C`s|jjdtg}|jd|jdk rT|jd|j|jn|jdk r|j|js|jjddj |jn|jd|j|jn|j dk r|jd|j|j n|j dk r|jd|j|j n|j dk rD|jd |j|j n|j s]|jd n|jdk r|jd |j|jn|jr|jd n|j|j|j|\}}}|dk r |d kr |jjd|jd|d|n|jdk r|jjdtg}|jddj d|jd|j}|j|d|\}}}|dk r|d kr|jjd|jd|d|qn|jdk rtt|jrt|j}|jjdt}xx|D]m}||j|g}|j|\}}}|dk r|d kr|jjd|jd|d|qqWn|||fS(Ntaddusers-Ds-uR5sGroup {0} does not exists-Gs-gs-hs-ss-Hs-ks-SiRRRs --encrypteds{name}:{password}RRc(R7RqRWR%RR>RRyRCRRR,RR R"R#RRkRR2RYR}( RGRhRRRRcR2t add_cmd_binR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR s\  "       % (  ,cC`sD|jjdt|jg}|jr7|jdn|j|S(Ntdelusers --remove-home(R7RqRWRRR%Rk(RGRh((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR s   c C`s|j}g}d}d}d}|j}|jjdt}|jjdt}|jdk rt|jr|j}t |j |} | rx|D]|} | | kr||j | g} |j | \}}}|dk r"|dkr"|jj d|j d|d|q"qqWx| D]} | |kr-|j r-||j | g} |j | \}}}|dk r|dkr|jj d|j d|d|qq-q-Wqn|jdkr|jdk r|d |jkr|jjd tg} | jd d jd|j d |j}|j | d|\}}}|dk r|dkr|jj d|j d|d|qn|||fS(NRaRtdelgroupiRR5RRiRs --encrypteds{name}:{password}RRc(RR>RR7RqRWR2RYR}RURRRkRCR%R+RR(RGRR2RRRRRtremove_cmd_binRRtadd_cmdt remove_cmdRhRc((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR s@     , 21 ((RRRRRR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyR s A tAlpinecB`seZdZdZdZRS(s This is the Alpine User manipulation class. It inherits the BusyBox class behaviors such as using adduser and deluser commands. tLinuxR(RRRRSR (((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyRJ sc GC`stddddddddtj}tdtd tdd d d d dd gdtdd dtddgdtdddtddd tdtdd dtdddtdd dtdddtdd dtdd dtdtdd d tddd!tdd d"tddd td#tddd td$tddd tdd%gd&tdd d'tddd td(tddd td)tddd td*tddd+tddd |dd,tdd d |dd-tddd.tdd d |dd/tdd dtd0tdd d d1d d1d2gdtd3tdd4d5tdddtd6tddd7tdd d8tdd d9tdd !d:td;dNdOg}t|}|j|j d<|j |j r$|j d=|j nd}d>}d>}i}|j |d<|j |d <|j dkr|jr|jr|jd?tn|j\}}}|dkr|jd|j d@|dA|n|j|d"<|j|d#tsockett gethostnameR RWRTRR`ReRSR RRRRdR RRCRRR,R RERFR~RRRRR#RR%R!RR2RzRR9RRRRR( t ssh_defaultsR7RrRRRtresulttpath_needs_parentsRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pytmainS s!'         "      $    "          !  "   t__main__(5t __future__RRRRt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNRRR)RERRRRR RRR@Rtansible.module_utilsRtansible.module_utils.basicR R tansible.module_utils._textR R R RRWRt ImportErrorRTtcompileR[tobjectRR!R/R1R9R<RWRRRRRR(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/user.pyts`   )e                  d