+
    ˜qgjv	  ã                   ó^   € ^ RI t ^ RIt^ RIHtHt ] P
                  ! ]4      t ! R R4      tR# )é    N)Úatomic_helperÚsubpc                   ó0   a € ] tR t^t o RtR tR tRtV tR# )ÚPasswordConfiguratorzj
Class for changing configurations related to passwords in a VM. Includes
setting and expiring passwords.
c                óh  € \         P                  R4       V'       d   \        P                  ! V4      p. p\	        RR4       FI  pVP                  R4      ^,          R8X  g   K"  VP                  VP                  R4      ^ ,          4       KK  	  . p\	        RR4       F4  pVP                  R4      ^ ,          pWt9   g   K#  VP                  V4       K6  	  V'       d(   \         P                  R4       VP                  RV4       V'       d   V P                  V4       \         P                  R	4       R
# )zû
Main method to perform all functionalities based on configuration file
inputs.
@param passwd: encoded admin password.
@param resetPasswd: boolean to determine if password needs to be reset.
@return cfg: dict to be used by cloud-init set_passwd code.
zStarting password configurationz/etc/passwdÚrÚ:Ú0z/etc/shadowzSetting admin passwordÚrootzConfigure Password completed!N)	ÚLOGÚinfor   Úb64dÚopenÚsplitÚappendÚ
set_passwdÚreset_password)ÚselfÚpasswdÚresetPasswdÚdistroÚallRootUsersÚlineÚuidUsersListÚusers   &&&&    ÚT/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/config_passwd.pyÚ	configureÚPasswordConfigurator.configure   sè   € ô 	�‰Ð2Ô3ßÜ"×'Ò'¨Ó/ˆFØˆÜ˜¨Ö,ˆDØ�z‰z˜#‹˜qÕ! SÖ(Ø×#Ñ# D§J¡J¨s£O°AÕ$6Ö7ñ -ð ˆÜ˜¨Ö,ˆDØ—:‘:˜c“? 1Õ%ˆDØÖ#Ø×#Ñ# DÖ)ñ -÷ Ü�H‰HÐ-Ô.Ø×Ñ˜f fÔ-ßØ×Ñ Ô-Ü�‰Ð0Ö1ó    c                ót  € \         P                  R4       V F  p \        P                  ! RRV.4       K  	  R	#   \        P                   dh   p\        P
                  P                  R4      '       d!   \        P                  ! RRRT.4        R	p?K}  \         P                  RTT4        R	p?Kš  R	p?ii ; i)
z¼
Method to reset password. Use passwd --expire command. Use chage if
not succeeded using passwd command. Log failure message otherwise.
@param: list of users for which to expire password.
zExpiring password.r   z--expirez/usr/bin/chageÚchagez-dr
   z/Failed to expire password for %s with error: %sN)r   r   r   ÚProcessExecutionErrorÚosÚpathÚexistsÚwarning)r   ÚuidUserListr   Úes   &&  r   r   Ú#PasswordConfigurator.reset_password3   s‘   € ô 	�‰Ð%Ô&ÛˆDð
Ü—	’	˜8 Z°Ð6Ö7ó  øô ×-Ñ-ô Ü—7‘7—>‘>Ð"2×3Ò3Ü—I’I˜w¨¨c°4Ð8×9Ò9ä—K‘KØIØØ÷ò ûð	ús   œ;»B7Á?B2ÂB2Â2B7© N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s   ø‡ € ñò
2÷8ð r   r   )	Úloggingr#   Ú	cloudinitr   r   Ú	getLoggerr+   r   r   r*   r   r   Ú<module>r6      s*   ðó Û 	ç )à×Ò˜Ó!€÷4ó 4r   