|
|
@ -56,6 +56,9 @@
|
|
|
|
#define KRB5_FILE "/etc/krb5.conf"
|
|
|
|
#define KRB5_FILE "/etc/krb5.conf"
|
|
|
|
#define LDAP_FILE "/etc/ldap.conf"
|
|
|
|
#define LDAP_FILE "/etc/ldap.conf"
|
|
|
|
#define NSSWITCH_FILE "/etc/nsswitch.conf"
|
|
|
|
#define NSSWITCH_FILE "/etc/nsswitch.conf"
|
|
|
|
|
|
|
|
#define PAMD_DIRECTORY "/etc/pam.d/"
|
|
|
|
|
|
|
|
#define PAMD_COMMON_ACCOUNT "common-account"
|
|
|
|
|
|
|
|
#define PAMD_COMMON_AUTH "common-auth"
|
|
|
|
#define DEFAULT_IGNORED_USERS_LIST "avahi,avahi-autoipd,backup,bin,colord,daemon,games,gnats,haldaemon,hplip,irc,klog,landscape,libuuid,list,lp,mail,man,messagebus,news,ntp,polkituser,postfix,proxy,pulse,root,rtkit,saned,sshd,statd,sync,sys,syslog,timidity,usbmux,uucp,www-data"
|
|
|
|
#define DEFAULT_IGNORED_USERS_LIST "avahi,avahi-autoipd,backup,bin,colord,daemon,games,gnats,haldaemon,hplip,irc,klog,landscape,libuuid,list,lp,mail,man,messagebus,news,ntp,polkituser,postfix,proxy,pulse,root,rtkit,saned,sshd,statd,sync,sys,syslog,timidity,usbmux,uucp,www-data"
|
|
|
|
|
|
|
|
|
|
|
|
typedef KGenericFactory<LDAPConfig, TQWidget> ldapFactory;
|
|
|
|
typedef KGenericFactory<LDAPConfig, TQWidget> ldapFactory;
|
|
|
@ -340,6 +343,8 @@ void LDAPConfig::save() {
|
|
|
|
writeLDAPConfFile();
|
|
|
|
writeLDAPConfFile();
|
|
|
|
// Write the NSSwitch configuration file
|
|
|
|
// Write the NSSwitch configuration file
|
|
|
|
writeNSSwitchFile();
|
|
|
|
writeNSSwitchFile();
|
|
|
|
|
|
|
|
// Write the PAM configuration files
|
|
|
|
|
|
|
|
writePAMFiles();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
load();
|
|
|
|
load();
|
|
|
@ -683,8 +688,6 @@ void LDAPConfig::writeNSSwitchFile() {
|
|
|
|
if (file.open(IO_WriteOnly)) {
|
|
|
|
if (file.open(IO_WriteOnly)) {
|
|
|
|
TQTextStream stream( &file );
|
|
|
|
TQTextStream stream( &file );
|
|
|
|
|
|
|
|
|
|
|
|
LDAPRealmConfig realmcfg = m_realms[m_defaultRealm];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stream << "# This file was automatically generated by TDE\n";
|
|
|
|
stream << "# This file was automatically generated by TDE\n";
|
|
|
|
stream << "# All changes will be lost!\n";
|
|
|
|
stream << "# All changes will be lost!\n";
|
|
|
|
stream << "\n";
|
|
|
|
stream << "\n";
|
|
|
@ -706,6 +709,39 @@ void LDAPConfig::writeNSSwitchFile() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void LDAPConfig::writePAMFiles() {
|
|
|
|
|
|
|
|
TQFile file(PAMD_DIRECTORY PAMD_COMMON_ACCOUNT);
|
|
|
|
|
|
|
|
if (file.open(IO_WriteOnly)) {
|
|
|
|
|
|
|
|
TQTextStream stream( &file );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stream << "# This file was automatically generated by TDE\n";
|
|
|
|
|
|
|
|
stream << "# All changes will be lost!\n";
|
|
|
|
|
|
|
|
stream << "\n";
|
|
|
|
|
|
|
|
stream << "account sufficient pam_unix.so nullok_secure" << "\n";
|
|
|
|
|
|
|
|
stream << "account sufficient pam_ldap.so" << "\n";
|
|
|
|
|
|
|
|
stream << "account required pam_permit.so" << "\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
file.close();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQFile file2(PAMD_DIRECTORY PAMD_COMMON_AUTH);
|
|
|
|
|
|
|
|
if (file2.open(IO_WriteOnly)) {
|
|
|
|
|
|
|
|
TQTextStream stream( &file2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stream << "# This file was automatically generated by TDE\n";
|
|
|
|
|
|
|
|
stream << "# All changes will be lost!\n";
|
|
|
|
|
|
|
|
stream << "\n";
|
|
|
|
|
|
|
|
stream << "auth [default=ignore success=ignore] pam_mount.so" << "\n";
|
|
|
|
|
|
|
|
stream << "auth sufficient pam_unix.so nullok try_first_pass" << "\n";
|
|
|
|
|
|
|
|
stream << "auth [default=ignore success=1 service_err=reset] pam_krb5.so ccache=/tmp/krb5cc_%u use_first_pass" << "\n";
|
|
|
|
|
|
|
|
stream << "auth [default=die success=done] pam_ccreds.so action=validate use_first_pass" << "\n";
|
|
|
|
|
|
|
|
stream << "auth sufficient pam_ccreds.so action=store use_first_pass" << "\n";
|
|
|
|
|
|
|
|
stream << "auth required pam_deny.so" << "\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
file2.close();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int LDAPConfig::buttons() {
|
|
|
|
int LDAPConfig::buttons() {
|
|
|
|
return KCModule::Apply|KCModule::Help;
|
|
|
|
return KCModule::Apply|KCModule::Help;
|
|
|
|
}
|
|
|
|
}
|
|
|
|