Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /usr/share/authconfig/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/authconfig/authconfig-tui.pyc
�
�8�Yc@s�ddlZddlZddlZddlZddlZddlZejZddlm	Z	m
Z
ddlZyejej
d�Wn$ejk
r�ejjd�nXd�Zed�r�ddlZnde	fd��YZd	e
fd
��YZdfd��YZd
efd��YZedkr�ejejej�ejd�ed�rqe�Zn	e�Zejej��ndS(i����N(tOptionParsertIndentedHelpFormatterts%Warning: Unsupported locale setting.
cCstjdj|�dkS(Ni(tsystargvtfind(tname((s'/usr/share/authconfig/authconfig-tui.pytrunsAs%ssauthconfig-tuitUnihelpOptionParsercBseZdd�ZRS(cCs~|dkrtj}ntj�}t|dd�}|sI|dkrR|}n|j|j�j|�j	|d��dS(Ntencodingtasciitreplace(
tNoneRtstdouttlocaletgetpreferredencodingtgetattrtwritetformat_helptdecodetencode(tselftfiletsrcencodingR	((s'/usr/share/authconfig/authconfig-tui.pyt
print_help,s	N(t__name__t
__module__RR(((s'/usr/share/authconfig/authconfig-tui.pyR+stNonWrapFormattercBseZd�ZRS(cCsg}|j|}|j|jd}t|�|kr[d|jd|f}|j}n8d|jd||f}d|jd||f}d}|j|�|jr�|j|�}|jd|d|f�n |ddkr�|jd�ndj|�S(Nis%*s%s
Rs	%*s%-*s  ii����s
(toption_stringst
help_positiontcurrent_indenttlentappendthelptexpand_defaulttjoin(Rtoptiontresulttoptst	opt_widthtindent_firstt	help_text((s'/usr/share/authconfig/authconfig-tui.pyt
format_option6s 

	(RRR*(((s'/usr/share/authconfig/authconfig-tui.pyR5st
AuthconfigcBs}eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�ZRS(
cCsCt|_t|_t|_t|_t|_t|_d|_dS(Ni(tFalset	nis_availtkerberos_availt
ldap_availt
sssd_availtcache_availt
fprintd_availtretval(R((s'/usr/share/authconfig/authconfig-tui.pyt__init__Zs						cCsdS(Nt
authconfig((R((s'/usr/share/authconfig/authconfig-tui.pytmodulecscCs$tjjd|j�|f�dS(Ns%s: %s
(RtstderrRR6(Rterror((s'/usr/share/authconfig/authconfig-tui.pyt
printErrorfscCsud}d}xX|D]P}|dkr2|d7}n|rO|t|�d7}n||7}|d7}qW|d7}|S(Nit<t|t=it>(tstr(RtltaddidxtidxR!titem((s'/usr/share/authconfig/authconfig-tui.pytlistHelpis



c	CsBtd�|j�}|j�dkr5|d7}nt|dtdt��}|jdddd	d	td
��|jdddd
d	td��|jddd
d	td��|jdddd
d	td��|jddd
d	td��|jdd|jtjt�d	td��|jddd
d	td��|jddd
d	td��|jddtd�d	td��|jd dtd!�d	td"��|jd#dd
d	td$��|jd%dd
d	td&��|jd'dd
d	td(��|jd)dd
d	td*��|jd+dtd!�d	td,��|jd-dtd.�d	td/��|jd0d1dd
d	td2��|jd3d4dd
d	td5��|jd6dd
d	td7��|jd8dd
d	td9��|jd:dtd;�d	td<��|jd=dd
d	td>��|jd?dd
d	td@��|jdAdd
d	tdB��|jdCdd
d	tdD��|jdEdtdF�d	tdG��|jtj	�t
�}|jdHd|d	tdI��|jdJdd
d	tdK��|jdLdd
d	tdM��|jdNdd
d	tdO��|jdPdd
d	tdQ��|jdRdd
d	tdS��|jdTdd
d	tdU��|jdVdtd!�d	tdW��|jdXdtd!�d	tdY��|jdZdtd[�d	td\��|jd]dd
d	td^��|jd_dd
d	td`��|jdadd
d	tdb��|jdcdd
d	tdd��|jdedd
d	tdf��|jdgdd
d	tdh��|jdidd
d	tdj��|jdkdd
d	tdl��|jdmddnd	tdo��|jdpdtd[�d	tdq��|jdrdtds�d	tdt��|jdudtdv�d	tdw��|jdxdydzdtd{�d	td|��|jd}dd~d	td��|jd�dd�d	td���|jd�dd�d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd�d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dtd�d	td���|jd�dtd[�d	td���|jd�dtds�d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd�d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd�d	td���|jd�dd�d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dtd��d	td���|jd�dtd��d	td���|jd�dtd��d	td���|jd�dtd��d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dd
d	td���|jd�dtd��d	td���|jd�dd
d	td���|jd�dd
d	td���|j�dkr�|jddd
d	td��|jddd
d	td��n"|jdddd
d	td��|jddd
d	td��|jd	dd
d	td
��|jddtd�d	td
��|jddtd�d	td��|jddd
d	td��|j�\|_}|r�|j
td��tjd�n|j�dkr>|jjr>|jjr>|jjr>|jjr>|jjr>|jjr>|jjr>|j�tjd�ndS(Nsusage: %s [options]R5se {--update|--updateall|--test|--probe|--restorebackup <name>|--savebackup <name>|--restorelastbackup}tadd_help_optiont	formatters-hs--helptactionR!sshow this help message and exits--enableshadows--useshadowt
store_trues$enable shadowed passwords by defaults--disableshadows%disable shadowed passwords by defaults--enablemd5s--usemd5senable MD5 passwords by defaults--disablemd5s disable MD5 passwords by defaults
--passalgotmetavars&hash/crypt algorithm for new passwordss--enableniss*enable NIS for user information by defaults--disableniss+disable NIS for user information by defaults--nisdomains<domain>sdefault NIS domains--nisservers<server>sdefault NIS servers--enableldaps+enable LDAP for user information by defaults
--disableldaps,disable LDAP for user information by defaults--enableldapauths)enable LDAP for authentication by defaults--disableldapauths*disable LDAP for authentication by defaults--ldapservers#default LDAP server hostname or URIs--ldapbasedns<dn>sdefault LDAP base DNs--enableldaptlss--enableldapstarttlss&enable use of TLS with LDAP (RFC-2830)s--disableldaptlss--disableldapstarttlss'disable use of TLS with LDAP (RFC-2830)s--enablerfc2307bissBenable use of RFC-2307bis schema for LDAP user information lookupss--disablerfc2307bissCdisable use of RFC-2307bis schema for LDAP user information lookupss--ldaploadcacerts<URL>s load CA certificate from the URLs--enablesmartcards0enable authentication with smart card by defaults--disablesmartcards1disable authentication with smart card by defaults--enablerequiresmartcards0require smart card for authentication by defaults--disablerequiresmartcards7do not require smart card for authentication by defaults--smartcardmodules<module>s default smart card module to uses--smartcardactions(action to be taken on smart card removals--enablefingerprints9enable authentication with fingerprint readers by defaults--disablefingerprints:disable authentication with fingerprint readers by defaults--enableecryptfss"enable automatic per-user ecryptfss--disableecryptfss#disable automatic per-user ecryptfss--enablekrb5s)enable kerberos authentication by defaults
--disablekrb5s*disable kerberos authentication by defaults	--krb5kdcsdefault kerberos KDCs--krb5adminserversdefault kerberos admin servers--krb5realms<realm>sdefault kerberos realms--enablekrb5kdcdnss'enable use of DNS to find kerberos KDCss--disablekrb5kdcdnss(disable use of DNS to find kerberos KDCss--enablekrb5realmdnss)enable use of DNS to find kerberos realmss--disablekrb5realmdnss*disable use of DNS to find kerberos realmss--enablewinbinds.enable winbind for user information by defaults--disablewinbinds/disable winbind for user information by defaults--enablewinbindauths,enable winbind for authentication by defaults--disablewinbindauths-disable winbind for authentication by defaults
--smbsecuritys<user|server|domain|ads>s*security mode to use for samba and winbinds
--smbrealms5default realm for samba and winbind when security=adss--smbserverss	<servers>s(names of servers to authenticate againsts--smbworkgroups<workgroup>s'workgroup authentication servers are ins--smbidmapranges
--smbidmapuids
--smbidmapgids<lowest-highest>s4uid range winbind will assign to domain or ads userss--winbindseparators<\>s�the character which will be used to separate the domain and user part of winbind-created user names if winbindusedefaultdomain is not enableds--winbindtemplatehomedirs
</home/%D/%U>sGthe directory which winbind-created users will have as home directoriess--winbindtemplateshells</bin/false>sDthe shell which winbind-created users will have as their login shells--enablewinbindusedefaultdomains[configures winbind to assume that users with no domain in their user names are domain userss --disablewinbindusedefaultdomains_configures winbind to assume that users with no domain in their user names are not domain userss--enablewinbindofflines)configures winbind to allow offline logins--disablewinbindofflines+configures winbind to prevent offline logins--enablewinbindkrb5s+winbind will use Kerberos 5 to authenticates--disablewinbindkrb5s2winbind will use the default authentication methods
--winbindjoins<Administrator>s>join the winbind domain or ads realm now as this administrators
--enableipav2s?enable IPAv2 for user information and authentication by defaults--disableipav2s@disable IPAv2 for user information and authentication by defaults
--ipav2domains-the IPAv2 domain the system should be part ofs--ipav2realmsthe realm for the IPAv2 domains
--ipav2serversthe server for the IPAv2 domains--enableipav2nontps-do not setup the NTP against the IPAv2 domains--disableipav2nontps0setup the NTP against the IPAv2 domain (default)s--ipav2joins	<account>s%join the IPAv2 domain as this accounts--enablewinss#enable wins for hostname resolutions
--disablewinss$disable wins for hostname resolutions--enablepreferdnss3prefer dns over wins or nis for hostname resolutions--disablepreferdnss:do not prefer dns over wins or nis for hostname resolutions--enablehesiods-enable hesiod for user information by defaults--disablehesiods.disable hesiod for user information by defaults--hesiodlhss<lhs>sdefault hesiod LHSs--hesiodrhss<rhs>sdefault hesiod RHSs--enablesssdsOenable SSSD for user information by default with manually managed configurations
--disablesssdsVdisable SSSD for user information by default (still used for supported configurations)s--enablesssdauthsMenable SSSD for authentication by default with manually managed configurations--disablesssdauthsTdisable SSSD for authentication by default (still used for supported configurations)s--enableforcelegacys;never use SSSD implicitly even for supported configurationss--disableforcelegacys4use SSSD implicitly if it supports the configurations--enablecachecredss5enable caching of user credentials in SSSD by defaults--disablecachecredss6disable caching of user credentials in SSSD by defaults
--enablecachesXenable caching of user information by default (automatically disabled when SSSD is used)s--disablecaches.disable caching of user information by defaults--enablelocauthorizes1local authorization is sufficient for local userss--disablelocauthorizes1authorize local users also through remote services--enablepamaccesss.check access.conf during account authorizations--disablepamaccesss5do not check access.conf during account authorizations--enablesysnetauths0authenticate system accounts by network servicess--disablesysnetauths0authenticate system accounts by local files onlys--enablemkhomedirs6create home directories for users on their first logins--disablemkhomedirs=do not create home directories for users on their first logins--passminlens<number>sminimum length of a passwords--passminclasss1minimum number of character classes in a passwords--passmaxrepeats;maximum number of same consecutive characters in a passwords--passmaxclassrepeatsDmaximum number of consecutive characters of same class in a passwords--enablereqlowers6require at least one lowercase character in a passwords--disablereqlowers1do not require lowercase characters in a passwords--enablerequppers6require at least one uppercase character in a passwords--disablerequppers1do not require uppercase characters in a passwords--enablereqdigits(require at least one digit in a passwords--disablereqdigits#do not require digits in a passwords--enablereqothers2require at least one other character in a passwords--disablereqothers-do not require other characters in a passwords--enablefaillocksNenable account locking in case of too many consecutive authentication failuress--disablefaillocksGdisable account locking on too many consecutive authentication failuress--faillockargss	<options>sthe pam_faillock module optionss	--nostarts+do not start/stop portmap, ypbind, and nscds--tests>do not update the configuration files, only print new settingssauthconfig-tuis--backs<display Back instead of Cancel in the main dialog of the TUIs--kickstarts1do not display the deprecated text user interfaces--updatesDopposite of --test, update configuration files with changed settingss--updateallsupdate all configuration filess--probes)probe network for defaults and print thems--savebackups<name>s(save a backup of all configuration filess--restorebackups)restore the backup of configuration filess--restorelastbackupsXrestore the backup of configuration files saved before the previous configuration changesunexpected argumenti(t_R6RR,Rt
add_optionRCtauthinfotpassword_algorithmstgetSmartcardActionstTruet
parse_argstoptionsR9Rtexittprobettesttupdatet	updateallt
savebackupt
restorebackuptrestorelastbackupR(Rtusagetparsertactshelptargs((s'/usr/share/authconfig/authconfig-tui.pytparseOptionsvs�





















































































































 '

cCs�tj|j�}|j�|jrF|jrFd|j|jfGHn|jrp|jrpd|j|jfGHn|jr�d|j|j	p�d|j
p�dfGHndS(Nshesiod %s/%ssldap %s/%s
skrb5 %s/%s/%s
R(RKtAuthInfoR9RRt	hesiodLHSt	hesiodRHSt
ldapServert
ldapBaseDNt
kerberosRealmtkerberosKDCtkerberosAdminServer(Rtinfo((s'/usr/share/authconfig/authconfig-tui.pyRR�s
				cCsLtj|j�|_|jj�|_|jjdkrHt|j_ndS(N(	RKtreadR9RftcopytpristineinfotenableLocAuthorizeRRN(R((s'/usr/share/authconfig/authconfig-tui.pytreadAuthInfo�scCs�tjtjtj�o-tjtjtj�|_tjtjtj�|_tjtj	tj�o{tjtj
tj�|_tjtjtj�o�tjtj
tj�|_tjtjtj�|_tjtjtj�|_dS(N(tostaccessRKtPATH_YPBINDtX_OKtPATH_LIBNSS_NISR-t
PATH_PAM_KRB5R.t
PATH_PAM_LDAPtPATH_LIBNSS_LDAPR/tPATH_PAM_SSStPATH_LIBNSS_SSSR0t	PATH_NSCDR1tPATH_PAM_FPRINTDR2(R((s'/usr/share/authconfig/authconfig-tui.pyttestAvailableSubsys�scCs�i%dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6}idKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6}xr|j�D]d\}}t|jd�|�rt|j|t�nt|jd�|�r�t|j|t�q�q�Wy+|jjrmd|j_nd�|j_Wnt	k
r�nX|jj
r�|jj
|jjkr�|jj|jj
�|j_
|jj|jj
�|j_nyb|jj}|dkrRt|�}|d�krR|jtd���d|j_d�|_qRnWn9tk
r�|jtd���d|j_d�|_nXy�|jj}|dkr't|�}|d�kr�|jtd���d|j_d�|_n|d�kr'|jtd���d|j_d�|_q'nWn9tk
rc|jtd���d|j_d�|_nXyb|jj}|dkr�t|�}|d�kr�|jtd���d|j_d�|_q�nWn9tk
r|jtd���d|j_d�|_nXyb|jj}|dkrct|�}|d�krc|jtd���d|j_d�|_qcnWn9tk
r�|jtd���d|j_d�|_nXxT|j�D]F\}}t|j|�dkr�t|j|t|j|��q�q�W|jjrS|jjjd�d��}|d�|j_t|�d�krS|d�|j_qSn|jjdkrz|jj|j_n|jj r�y,t|jj �}t!j"�||j_#Wq�tt$fk
r�|jtd���d�|j_#q�Xn|jj%r.|jj&d8kr.|jtd���t|j_%n|jj'ss|jj(rUd�|j_)n|jj*r�d�|j_)q�n@|jj't!j+kr�|jtd���d�|j_)d�|_ndS(�NtenableShadowtshadowRjtlocauthorizetenablePAMAccesst	pamaccesstenableSysNetAutht
sysnetauthtenableMkHomeDirt	mkhomedirtenableCachetcachetenableEcryptfstecryptfstenableHesiodthesiodt
enableLDAPtldaptenableLDAPStldaptlstenableRFC2307bist
rfc2307bistenableLDAPAuthtldapauthtenableKerberostkrb5t	enableNIStnistkerberosKDCviaDNSt
krb5kdcdnstkerberosRealmviaDNStkrb5realmdnstenableSmartcardt	smartcardt
enableFprintdtfingerprinttforceSmartcardtrequiresmartcardt
enableWinbindtwinbindtenableWinbindAuthtwinbindauthtwinbindUseDefaultDomaintwinbindusedefaultdomaintwinbindOfflinetwinbindofflinetwinbindKrb5twinbindkrb5tenableIPAv2tipav2t
ipav2NoNTPt
ipav2nontpt
enableWINStwinst
enableSSSDtsssdtenableSSSDAuthtsssdauthtenableForceLegacytforcelegacytenableCacheCredst
cachecredstpreferDNSinHostst	preferdnstpassReqLowertreqlowertpassReqUppertrequppertpassReqDigittreqdigittpassReqOthertreqothertenableFaillocktfaillocktpasswordAlgorithmtpassalgoR_t	hesiodlhsR`t	hesiodrhsRat
ldapserverRbt
ldapbasednt
ldapCacertURLtldaploadcacertRct	krb5realmRdtkrb5kdcRetkrb5adminservertsmartcardModuletsmartcardmoduletsmartcardActiontsmartcardactiont	nisDomaint	nisdomaint	nisServert	nisservertsmbWorkgrouptsmbworkgroupt
smbServerst
smbserverstsmbSecuritytsmbsecuritytsmbRealmtsmbrealmt
smbIdmapRanget
smbidmaprangetwinbindSeparatortwinbindseparatortwinbindTemplateHomedirtwinbindtemplatehomedirtwinbindTemplateShelltwinbindtemplateshelltipav2Domaintipav2domaint
ipav2Realmt
ipav2realmtipav2Servertipav2servert
passMinLent
passminlentpassMinClasstpassminclasst
passMaxRepeatt
passmaxrepeattpassMaxClassRepeattpassmaxclassrepeattfaillockArgstfaillockargstenabletdisableRis!The passminlen minimum value is 6is-The passminlen option value is not an integeris+The passminclass value must not be negativeis0The passminclass value must not be higher than 4s/The passminclass option value is not an integers,The passmaxrepeat value must not be negatives0The passmaxrepeat option value is not an integers1The passmaxclassrepeat value must not be negatives5The passmaxclassrepeat option value is not an integert%is(Bad smart card removal action specified.sO--enablerequiresmartcard is not supported for module 'sssd', option is ignored.tmd5tdescrypts;Unknown password hashing algorithm specified, using sha256.tsha256(,t	iteritemsRRPtsetattrRfRNR,R�t
ldapSchematAttributeErrorR�RctgetKerberosKDCRdtgetKerberosAdminServerReR�RtintR9RIR3t
ValueErrorR�R�R�twinbindjointsplittjoinUserRtjoinPasswordt	ipav2joinR�RKRMR�t
IndexErrortenablerequiresmartcardR�R�t	enablemd5R�t
disablemd5RL(Rt
bool_settingststring_settingstopttaivaltvaltlstRA((s'/usr/share/authconfig/authconfig-tui.pytoverrideSettings�sB




$!







&cCstS(N(RN(R((s'/usr/share/authconfig/authconfig-tui.pytdoUIgscCsht}|jjr'|jjt�}n|jjdkrd|jjt�r[|jj�qdt	}n|S(N(
RNRPRRft
joinDomainRRt
joinIPADomaintwriteSysconfigR,(Rtret((s'/usr/share/authconfig/authconfig-tui.pyRjs	cCs�|jj�|jjr7|jj�s7d|_q7n|jj�|jjrn|jj�s�d|_q�n!|jj	|j
�s�d|_n|j�s�d|_n|jj|jj
�dS(Niiii(RfttestLDAPCACertsR�tdownloadLDAPCACertR3trehashLDAPCACertsRPRURtwriteChangedRiRtposttnostart(R((s'/usr/share/authconfig/authconfig-tui.pyt
writeAuthInfoxs

cCs�|j�|jjr0|j�tjd�n|jjrrtj�dkrr|jt	d��tjd�n|j
�|jjr�|jj
�}tjt|��n|jjr�|jj|jj�}tjt|��n|jjr$|jj|jj�}tjt|��n|j�|j�|j�sv|jjrf|jt	d��ntjd�n|jjr�|jj�n
|j�|jS(Niscan only be run as rootisdialog was cancelledi(R]RPRRRRQRSRltgetuidR9RIRkRXRftrestoreLastRRWt
restoreBackupRVt
saveBackupRxRRt	printInfoRR3(Rtrv((s'/usr/share/authconfig/authconfig-tui.pytrun�s6





(RRR4R6R9RCR]RRRkRxRRRRR%(((s'/usr/share/authconfig/authconfig-tui.pyR+Ys					
	�$	
			�			t
AuthconfigTUIcBs�eZd�Zd�Zd�Zd�Zddd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�ZRS(cCsdS(Nsauthconfig-tui((R((s'/usr/share/authconfig/authconfig-tui.pyR6�scCs/|jjr+|jjr+|jjt�ndS(N(RPt	kickstartRRfRRN(R((s'/usr/share/authconfig/authconfig-tui.pyR�scCs�|s
dSx�|r�|d}|d}t|�tkrv|jj�r_|d}|d}qv|d}|d}ntj|tj�s�td�||d|f}tj	|j
td�|td�g�n|d}q
WdS(Niiis�The %s file was not found, but it is required for %s support to work properly.
Install the %s package, which provides this file.tWarningtOki(ttypettupleRft
sssdSupportedRlRmtR_OKRItsnacktButtonChoiceWindowtscreen(Rttoggletwarningtpathtpackagettext((s'/usr/share/authconfig/authconfig-tui.pytwarn�s 	





	+c#
CsEtjtd�ddg}tjtd�ddg}tjtjftd�d6dg}tjtjftd�d7dg}tjtj	ftd
�d8dg}tj
td�d
dg}tjtd�ddg}tjtd�ddg}tj
td�d|g}	tjtd�d|	g}
tjdd�}tjtd��}|j|dddddd�tjtd�t|jj��}
}|j|dddddd�tjtd�t|jj��}}|j|dddddd�tjtd�t|jj��}}|j|dddddd�tjtd�t|jj��}}|j|dd dddd�tjtd!�t|jj��}}|j|dd"dddd�tjdd#�}tjtd$��}|j|dddddd�tjtd%�t|jjd&k��}}|j|dddddd�tjtd'�t|jj��}}|j|dddddd�tjtd(�t|jj��}}|j|dddddd�tjtd)�t|jj��}}|j|dd dddd�tjtd*�t|jj��}}|j|dd"dddd�tjtd+�t|jj ��}}|j|dddddd�tjtd,�t|jj!��}}|j|dd-dddd�tjdd�}|j|ddddd.dd/d9�|j|ddd0dd.dd/d:�tjdd�}tj"|j#j$r�td1�p�td2��}tj"td3��}|j|dd�|j|dd�tjdd�}|j|dddd�|j|dddd�tj%�} |j&j'|td4��| j(|�| j)�}||kr.|
j*�|j_|j*�|j_|j*�|j_|j*�|j_|j*�|j_|j*�|j_|j*�r�d&|j_n!|jjd&krd5|j_n|j*�|j_|j*�|j_|j*�|j_ |j*�|j_!|j*�|j_|jj|f|jj|f|jj|f|jj|
f|jj|f|jj|f|jj|f|jj|f|jj |	fg	}!x)|!D]}"|j+|"d|"d�q	Wn|j&j,�||kS(;NtcachingtnscdsFingerprint readertpam_fprintdtKerberostpam_krb5ssssd-clientsLDAP authenticationtpam_ldaptLDAPs
nss-pam-ldapdtNIStypbindsshadow passwordsshadow-utilstWinbindssamba-clientsWinbind authentications
samba-winbindiisUser Informationit
anchorLefttgrowxsCache InformationsUse LDAPisUse NISis	Use IPAv2isUse WinbindiitAuthenticationsUse MD5 PasswordsR�sUse Shadow PasswordssUse LDAP AuthenticationsUse KerberossUse Fingerprint readersUse Winbind Authentications!Local authorization is sufficientit	anchorToptpaddingtanchorRighttBacktCanceltNextsAuthentication ConfigurationR�(R;ssssd-client(R<ssssd-client(s
nss-pam-ldapdssssd-client(iiii(iiii(-RKRvRIRRwRqRtRrRsRuRntPATH_PWCONVtPATH_WINBIND_NETtPATH_PAM_WINBINDtPATH_LIBNSS_WINBINDR.tGridtLabeltsetFieldtCheckboxtboolRfR�R�R�R�R�R�RyR�R�R�R�RjtButtonRPtbacktFormR0tgridWrappedWindowtaddR%tselectedR6t	popWindow(#Rt	warnCachetwarnFprintdtwarnKerberostwarnLDAPAuthtwarnLDAPtwarnNISt
warnShadowtwarnWinbindNettwarnWinbindAuthtwarnWinbindtinfoGridtcompR�tcbR�R�R�R�tauthGridR�RztldapaR�tfprintdR�R{tmechGridt
buttonGridtcanceltoktmainGridtformtallwarningsR2((s'/usr/share/authconfig/authconfig-tui.pytgetMainChoices�s�$$$(((((.((((((%%-


cCs�t|�}tjd|�}d}	g}
xn|D]f\}}}
}|dkr�tj|tt|j|
���}|
j|�|jtj	d�d|	dd�|j|d|	dd�n�|dkrEtj	|�}|j|d|	d	ddd�tj
d
t|j|
�d|�}|
j|�|j|d|	dd�nH|d
kr:tj	|�}|j|d|	d	ddddd�y#t|j|
�}|j|�Wntk
r�|d}nXd}g}x*|D]"}|j||||kf�q�Wtjd|�}|
j|�|j|d|	dd�nS|dkr�tjd|dddd�}|
j|�|j|d|	dd�n|	d7}	q1Wtj|r�dp�dd�}tj|�}tj|�}|r�tj|�p�d}|j|dd�|r!|j|dd�n|j||r6dp9dd�tjdd�}|j|ddd	ddd�|j|ddd	ddd�tj�}|jj||�|j|�xtr�|j�}||kr�Pn|
}x�|D]�\}}}
}|dkr2t|j|
|jd�j��q�|dkrct|j|
|jd�j��q�|d
kr�t|j|
|jd�j��q�|dkr�|jd�q�q�W||kr�Pn|r�|�q�q�W|jj�||kS(NiittfvalueRRFiRAtsvalueREi(thiddenRBtrvalueRDtlvaluei2tflexDowntflexUpi(iiii(iiii(iiii(iiii(RR.RNRQRRRRfR RPROtEntrytindexRRtRadioBartTextboxReflowedRSRUR0RVRWRNR%R�tpopRXtvaluetgetSelectionRY(Rtdtitletitemst	canceltxttoktxtt
anothertxtt	anothercbtrowstquestionGridtrowtwidgetstttdesctattrRRfRetselt
buttonlisttvtradioBarRkRlRmtanotherRnRotwcopy((s'/usr/share/authconfig/authconfig-tui.pytgetGenericChoices6s�$
"$
%

 


	%%%
cCs�dtd�ddfdtd�ddfdtd�ddfg}|jtd	�|td
�|rrtd�p{td�d
td�d|j�S(NRssDomain:R�isRealm:R�sServer:R�sIPAv2 SettingsRGRIR)R�sJoin DomainR�(RIR�tmaybeGetJoinSettings(Rtnextt	questions((s'/usr/share/authconfig/authconfig-tui.pytgetIPAv2Settings�s*cCsdtd�ddfdtd�ddfdtd�d	dfg}|jtd
�|td�|rrtd�p{td
��S(NRrsUse TLSR�RssServer:RaisBase DN:Rbs
LDAP SettingsRGRIR)(RIRR�(RR�R�((s'/usr/share/authconfig/authconfig-tui.pytgetLDAPSettings�s
cCsjdtd�ddfdtd�ddfg}|jtd�|td�|r]td	�pftd
��S(NRssDomain:R�isServer:R�sNIS SettingsRGRIR)(RIR�(RR�R�((s'/usr/share/authconfig/authconfig-tui.pytgetNISSettings�scCs�dtd�ddfdtd�ddfdtd�ddfd	td
�ddfd	td�d
dfg}|jtd�|td�|r�td�p�td��S(NRssRealm:RcisKDC:Rds
Admin Server:ReRrs"Use DNS to resolve hosts to realmsR�s!Use DNS to locate KDCs for realmsR�sKerberos SettingsRGRIR)(RIRR�(RR�R�((s'/usr/share/authconfig/authconfig-tui.pytgetKerberosSettings�scCs�dtd�ddfdtd�ddfg}|jjsKd|j_n|jtd	�|td
�td��r�|jj�|jj�|jjr�|jjt	�n|jj
r�|jjt	�n|jj�nt	S(NRssDomain Administrator:Ris	Password:Rit
Administrators
Join SettingsRHR)(
RIRfRR�R0tsuspendRTR�RRNR�Rtresume(RR�((s'/usr/share/authconfig/authconfig-tui.pytgetJoinSettings�s

cCs�dtd�ddfg}tj|j�}|j�|jj�t}|jj|�r�|j	td�|td�td��}n|r�|jj
�n|j�tS(NRvs�Some of the configuration changes you've made should be saved to disk before continuing.  If you do not save them, then your attempt to join the domain may fail.  Save changes?s
Save SettingstNotYes(
RIRRKRgR9RTRfR,tdiffersR�RR�RN(RR�t	orig_infoR((s'/usr/share/authconfig/authconfig-tui.pyR��s	


cCs�ddg}ddddddg}d	�}t||�}d
td�d|fd
td�ddfd
td�ddfd
td�ddfd
td�d|fg}|jtd�|td�|r�td�p�td�dtd�d|j�S(Ntadstdomains
/sbin/nologins/bin/shs	/bin/bashs	/bin/tcshs/bin/kshs/bin/zshcSstj|tj�S(N(RlRmRo(tshell((s'/usr/share/authconfig/authconfig-tui.pytshellexists�sRusSecurity Model:R�RssDomain:R�isDomain Controllers:R�s
ADS Realm:R�sTemplate Shell:R�sWinbind SettingsRGRIR)R�sJoin DomainR�(tfilterRIR�R�(RR�tsecuritytshellsR�R�((s'/usr/share/authconfig/authconfig-tui.pytgetWinbindSettings�s		*cCs:d}t}x!|dkr/|dkr/|jj�|dkrO|j�}n�|dkr�|jjr|jjp�|jjp�|jjp�|jjp�|jj	p�|jj
}|j|�}qn>|dkr-|jjs�|jjr|jjp|jjp|jj	p|jj
}|j|�}qn�|dkr~|jjr|jjpf|jj	pf|jj
}|j
|�}qn�|dkr�|jjr|jj	p�|jj
}|j|�}qn?|dkr|jj	s�|jj
rt}|j|�}qn|jj�|r"|d7}q|d8}qW|dkS(	Niiiiiiii(R,RfRTRqR�R�R�R�R�R�R�R�R�R�R�R�(RR�trctmore((s'/usr/share/authconfig/authconfig-tui.pyt
getChoices�sT


cCsBtd�|jj}tj|jtd�|td�g�dS(Ns�To connect to a LDAP server with TLS protocol enabled you need a CA certificate which signed your server's certificate. Copy the certificate in the PEM format to the '%s' directory.
Then press OK.R(R)(RIRft
ldapCacertDirR.R/R0(RR5((s'/usr/share/authconfig/authconfig-tui.pytdisplayCACertsMessages	
cCs�|jjrtSz�tj�|_|j�}|jjtd��|jj	dd|d�|j
�s{|jj�tS|j
jr�|j
j�r�|j�nWd|jj�XtS(NsN <Tab>/<Alt-Tab> between elements   |   <Space> selects   |  <F12> next screenis - (c) 1999-2005 Red Hat, Inc.(RPR'RNR.tSnackScreenR0R6tpushHelpLineRItdrawRootTextR�tfinishR,RfR�RR�(Rtpackageversion((s'/usr/share/authconfig/authconfig-tui.pyRs
N(RRR6RR6RqRR�R�R�R�R�R�R�R�R�R�R(((s'/usr/share/authconfig/authconfig-tui.pyR&�s				r_									-	t__main__R5(RKtacutiltgettextRltsignalRtlgettextRItoptparseRRRt	setlocaletLC_ALLtErrorR7RRR.RRR+R&RtSIGINTtSIG_DFLt
textdomainR6RQR%(((s'/usr/share/authconfig/authconfig-tui.pyt<module>s20		
$��P��
	

ZeroDay Forums Mini