+
    4Ssiõ  ã                   ó`   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHtH	t	H
t
 ^ RIHt  ! R R]4      tR# )é    N)Úldb)Úsystem_session)ÚCommandÚCommandErrorÚOption)ÚSamDBc            
       óâ   a € ] tR t^t o RtRtR]P                  R]P                  R]P                  /t
]! RRR]R	R
R7      ]! RR]R7      ]! RR]^ R7      ]! RRRRR7      .tR.tRR ltRtV tR# )Úcmd_user_setexpiryaä  Set the expiration of a user account.

The user can either be specified by their sAMAccountName or using the --filter option.

When a user account expires, it becomes disabled and the user is unable to logon.  The administrator may issue the samba-tool user enable command to enable the account for logon.  The permissions and memberships associated with the account are retained when the account is enabled.

The command may be run from the root userid or another authorized userid.  The -H or --URL= option can be used to execute the command on a remote server.

Example1:
samba-tool user setexpiry User1 --days=20 --URL=ldap://samba.samdom.example.com --username=administrator --password=passw1rd

Example1 shows how to set the expiration of an account in a remote LDAP server.  The --URL parameter is used to specify the remote target server.  The --username= and --password= options are used to pass the username and password of a user that exists on the remote server and is authorized to update that server.

Example2:
sudo samba-tool user setexpiry User2 --noexpiry

Example2 shows how to set the account expiration of user User2 so it will never expire.  The user in this example resides on the  local server.   sudo is used so a user may run the command as root.

Example3:
samba-tool user setexpiry --days=20 --filter='(samaccountname=User3)'

Example3 shows how to set the account expiration date to end of day 20 days from the current day.  The username or sAMAccountName is specified using the --filter= parameter and the username in this example is User3.

Example4:
samba-tool user setexpiry --noexpiry User4
Example4 shows how to set the account expiration so that it will never expire.  The username and sAMAccountName in this example is User4.

z.%prog (<username>|--filter <filter>) [options]Ú	sambaoptsÚversionoptsÚcredoptsz-Hz--URLz%LDB URL for database or target serverÚURLÚH)ÚhelpÚtypeÚmetavarÚdestz--filterzLDAP Filter to set password on)r   r   z--dayszDays to expiry)r   r   Údefaultz
--noexpiryzPassword does never expireÚ
store_trueF)r   Úactionr   z	username?Nc	                óH  € Vf   Vf   \        R4      hVf   R\        P                  ! V4      ,          pVP                  4       p	VP	                  V	4      p
\        V\        4       W©R7      p VP                  Wg^,          R,          VR7       T'       d/   T P                  P                  RT;'       g    T,          4       R # T P                  P                  R	T;'       g    TT3,          4       R #   \         d#   p\        RT;'       g    T: RT: 24      hR p?ii ; i)
Nz4Either the username or '--filter' must be specified!z((&(objectClass=user)(sAMAccountName=%s)))ÚurlÚsession_infoÚcredentialsÚlpi  )Úno_expiry_reqzFailed to set expiry for user 'z': zExpiry for user '%s' disabled.
z%Expiry for user '%s' set to %u days.
)r   r   Úbinary_encodeÚget_loadparmÚget_credentialsr   r   Ú	setexpiryÚ	ExceptionÚoutfÚwrite)ÚselfÚusernamer   r   r   r   ÚfilterÚdaysÚnoexpiryr   ÚcredsÚsamdbÚmsgs   &&&&&&&&&    Ú=/usr/lib/python3/dist-packages/samba/netcmd/user/setexpiry.pyÚrunÚcmd_user_setexpiry.runL   s  € àÒ ¢ÜÐUÓVÐVàŠ>Ø?Ä3×CTÒCTÐU]ÓC^Õ_ˆFà×#Ñ#Ó%ˆØ×(Ñ(¨Ó,ˆä˜!¬.Ó*:Ø"'ô0ˆð	*Ø�O‰O˜F¨2¥I°Õ$4ÀHˆOÔM÷
 Ø�I‰I�O‰OÐ>Ø×"Ð"˜Fõ$ö %ð �I‰I�O‰OÐDØ×"Ð"˜F DðH*õ *ö +øô ô 	*åØ×"Ð"˜FÒ"¢Cð )ó *ð *ûð	*ús   Á-!C4 Ã4D!Ã?DÄD!© )NNNNNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚsynopsisÚoptionsÚSambaOptionsÚVersionOptionsÚCredentialsOptionsÚtakes_optiongroupsr   ÚstrÚintÚtakes_optionsÚ
takes_argsr-   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r,   r
   r
      sœ   ø‡ € ñð8 @€Hð 	�W×)Ñ)Ø�w×-Ñ-Ø�G×.Ñ.ðÐñ 	ˆt�WÐ#JÐQTØ 3ô	(áˆzÐ @ÀsÔKÙˆxÐ.°SÀ!ÔDÙˆ|Ð">À|Ð]bÔcð€Mð �€J÷+ò +ó    r
   )Úsamba.getoptÚgetoptr6   Úsambar   Ú
samba.authr   Úsamba.netcmdr   r   r   Úsamba.samdbr   r
   r/   rB   r,   Ú<module>rI      s'   ðõ, Ý Ý %ß 6Ñ 6Ý ôH+˜ö H+rB   