|
|
@ -176,7 +176,7 @@ void KUserLDAP::data( KIO::Job *, const TQByteArray& data )
|
|
|
|
else if ( name == "shadowflag" )
|
|
|
|
else if ( name == "shadowflag" )
|
|
|
|
mUser->setFlag( val.toLong() );
|
|
|
|
mUser->setFlag( val.toLong() );
|
|
|
|
else if ( name == "sambaacctflags" ) {
|
|
|
|
else if ( name == "sambaacctflags" ) {
|
|
|
|
if ( !val.tqcontains( 'D' ) ) mUser->setDisabled( false );
|
|
|
|
if ( !val.contains( 'D' ) ) mUser->setDisabled( false );
|
|
|
|
} else if ( name == "sambasid" )
|
|
|
|
} else if ( name == "sambasid" )
|
|
|
|
mUser->setSID( val );
|
|
|
|
mUser->setSID( val );
|
|
|
|
else if ( name == "sambaprimarygroupsid" )
|
|
|
|
else if ( name == "sambaprimarygroupsid" )
|
|
|
@ -399,7 +399,7 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
|
|
|
|
ldif += "dn: " + getRDN( user ).utf8() + "," + mUrl.dn().utf8() + "\n";
|
|
|
|
ldif += "dn: " + getRDN( user ).utf8() + "," + mUrl.dn().utf8() + "\n";
|
|
|
|
if ( mod ) {
|
|
|
|
if ( mod ) {
|
|
|
|
ldif += "changetype: modify\n";
|
|
|
|
ldif += "changetype: modify\n";
|
|
|
|
ldif += "tqreplace: objectClass\n";
|
|
|
|
ldif += "replace: objectClass\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( caps & Cap_InetOrg )
|
|
|
|
if ( caps & Cap_InetOrg )
|
|
|
@ -416,7 +416,7 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
|
|
|
|
if ( ( caps & Cap_Samba ) && ( user->getCaps() & KU::KUser::Cap_Samba ) ) {
|
|
|
|
if ( ( caps & Cap_Samba ) && ( user->getCaps() & KU::KUser::Cap_Samba ) ) {
|
|
|
|
ldif += "objectClass: sambaSamAccount\n";
|
|
|
|
ldif += "objectClass: sambaSamAccount\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( mod && mObjectClasses.tqcontains( mUser ) ) {
|
|
|
|
if ( mod && mObjectClasses.contains( mUser ) ) {
|
|
|
|
TQStringList ocs = mObjectClasses[ mUser ];
|
|
|
|
TQStringList ocs = mObjectClasses[ mUser ];
|
|
|
|
kdDebug() << user->getName() << " has additional objectclasses: " << ocs.join(",") << endl;
|
|
|
|
kdDebug() << user->getName() << " has additional objectclasses: " << ocs.join(",") << endl;
|
|
|
|
TQValueListIterator<TQString> it;
|
|
|
|
TQValueListIterator<TQString> it;
|
|
|
@ -427,61 +427,61 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: cn\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: cn\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "cn", cn )+"\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "cn", cn )+"\n";
|
|
|
|
if ( caps & Cap_InetOrg ) {
|
|
|
|
if ( caps & Cap_InetOrg ) {
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: uid\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: uid\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "uid", user->getName() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "uid", user->getName() ) + "\n";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: userid\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: userid\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "userid", user->getName() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "userid", user->getName() ) + "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
|
|
|
|
|
|
|
|
if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) || ( caps & Cap_InetOrg ) ) {
|
|
|
|
if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) || ( caps & Cap_InetOrg ) ) {
|
|
|
|
if ( mod ) ldif += "tqreplace: userpassword\n";
|
|
|
|
if ( mod ) ldif += "replace: userpassword\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "userpassword", pwd )+"\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "userpassword", pwd )+"\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
|
|
|
|
if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
|
|
|
|
if ( mod ) ldif += "tqreplace: uidnumber\n";
|
|
|
|
if ( mod ) ldif += "replace: uidnumber\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "uidnumber",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "uidnumber",
|
|
|
|
TQString::number( user->getUID() ) )+"\n";
|
|
|
|
TQString::number( user->getUID() ) )+"\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: gidnumber\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: gidnumber\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "gidnumber",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "gidnumber",
|
|
|
|
TQString::number( user->getGID() ) )+"\n";
|
|
|
|
TQString::number( user->getGID() ) )+"\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: gecos\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: gecos\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? TQCString() :
|
|
|
|
ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? TQCString() :
|
|
|
|
TQCString( gecos.latin1() ) )+"\n";
|
|
|
|
TQCString( gecos.latin1() ) )+"\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: homedirectory\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: homedirectory\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "homedirectory",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "homedirectory",
|
|
|
|
user->getHomeDir() )+"\n";
|
|
|
|
user->getHomeDir() )+"\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: loginshell\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: loginshell\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "loginshell",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "loginshell",
|
|
|
|
user->getShell() )+"\n";
|
|
|
|
user->getShell() )+"\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ( mod ) {
|
|
|
|
if ( mod ) {
|
|
|
|
ldif += "tqreplace: uidnumber\n";
|
|
|
|
ldif += "replace: uidnumber\n";
|
|
|
|
ldif += "-\ntqreplace: gidnumber\n";
|
|
|
|
ldif += "-\nreplace: gidnumber\n";
|
|
|
|
ldif += "-\ntqreplace: homedirectory\n";
|
|
|
|
ldif += "-\nreplace: homedirectory\n";
|
|
|
|
ldif += "-\ntqreplace: loginshell\n";
|
|
|
|
ldif += "-\nreplace: loginshell\n";
|
|
|
|
ldif += "-\ntqreplace: gecos\n";
|
|
|
|
ldif += "-\nreplace: gecos\n";
|
|
|
|
ldif += "-\n";
|
|
|
|
ldif += "-\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( caps & Cap_InetOrg ) {
|
|
|
|
if ( caps & Cap_InetOrg ) {
|
|
|
|
if ( mod ) ldif += "tqreplace: sn\n";
|
|
|
|
if ( mod ) ldif += "replace: sn\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sn", user->getSurname() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sn", user->getSurname() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: mail\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: mail\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "mail", user->getEmail() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "mail", user->getEmail() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: displayName\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: displayName\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "displayname", user->getFullName() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "displayname", user->getFullName() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: postaladdress\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: postaladdress\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "postaladdress", user->getAddress() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "postaladdress", user->getAddress() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: telephoneNumber\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: telephoneNumber\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice1() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice1() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice2() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice2() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
@ -489,63 +489,63 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
|
|
|
|
|
|
|
|
|
|
|
|
if ( caps & Cap_Samba ) {
|
|
|
|
if ( caps & Cap_Samba ) {
|
|
|
|
if ( user->getCaps() & KU::KUser::Cap_Samba ) {
|
|
|
|
if ( user->getCaps() & KU::KUser::Cap_Samba ) {
|
|
|
|
if ( mod ) ldif += "tqreplace: sambadomainname\n";
|
|
|
|
if ( mod ) ldif += "replace: sambadomainname\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambadomainname", user->getDomain() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambadomainname", user->getDomain() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambauserworkstations\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambauserworkstations\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambauserworkstations", user->getWorkstations() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambauserworkstations", user->getWorkstations() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambahomepath\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambahomepath\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambahomepath", user->getHomePath() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambahomepath", user->getHomePath() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambahomedrive\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambahomedrive\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambahomedrive", user->getHomeDrive() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambahomedrive", user->getHomeDrive() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambalogonscript\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambalogonscript\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambalogonscript", user->getLoginScript() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambalogonscript", user->getLoginScript() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambaprofilepath\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambaprofilepath\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambaprofilepath", user->getProfilePath() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambaprofilepath", user->getProfilePath() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambalmpassword\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambalmpassword\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambalmpassword", user->getLMPwd() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambalmpassword", user->getLMPwd() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambantpassword\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambantpassword\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambantpassword", user->getNTPwd() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambantpassword", user->getNTPwd() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambasid\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambasid\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambasid", user->getSID().getSID() ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambasid", user->getSID().getSID() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambaacctflags\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambaacctflags\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambaacctflags", samflags ) + "\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambaacctflags", samflags ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambaprimarygroupsid\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambaprimarygroupsid\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambaprimarygroupsid",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambaprimarygroupsid",
|
|
|
|
user->getPGSID().getSID() ) + "\n";
|
|
|
|
user->getPGSID().getSID() ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambapwdlastset\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambapwdlastset\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambapwdlastset",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "sambapwdlastset",
|
|
|
|
TQString::number( user->getLastChange() ) ) + "\n";
|
|
|
|
TQString::number( user->getLastChange() ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: sambakickofftime\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: sambakickofftime\n";
|
|
|
|
if ( user->getExpire() != -1 ) ldif +=
|
|
|
|
if ( user->getExpire() != -1 ) ldif +=
|
|
|
|
KABC::LDIF::assembleLine( "sambakickofftime",
|
|
|
|
KABC::LDIF::assembleLine( "sambakickofftime",
|
|
|
|
TQString::number( user->getExpire() ) ) + "\n";
|
|
|
|
TQString::number( user->getExpire() ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ( mod ) {
|
|
|
|
if ( mod ) {
|
|
|
|
ldif += "tqreplace: sambahomepath\n";
|
|
|
|
ldif += "replace: sambahomepath\n";
|
|
|
|
ldif += "-\ntqreplace: sambahomedrive\n";
|
|
|
|
ldif += "-\nreplace: sambahomedrive\n";
|
|
|
|
ldif += "-\ntqreplace: sambalogonscript\n";
|
|
|
|
ldif += "-\nreplace: sambalogonscript\n";
|
|
|
|
ldif += "-\ntqreplace: sambaprofilepath\n";
|
|
|
|
ldif += "-\nreplace: sambaprofilepath\n";
|
|
|
|
ldif += "-\ntqreplace: sambalmpassword\n";
|
|
|
|
ldif += "-\nreplace: sambalmpassword\n";
|
|
|
|
ldif += "-\ntqreplace: sambantpassword\n";
|
|
|
|
ldif += "-\nreplace: sambantpassword\n";
|
|
|
|
ldif += "-\ntqreplace: sambasid\n";
|
|
|
|
ldif += "-\nreplace: sambasid\n";
|
|
|
|
ldif += "-\ntqreplace: sambaacctflags\n";
|
|
|
|
ldif += "-\nreplace: sambaacctflags\n";
|
|
|
|
ldif += "-\ntqreplace: sambaprimarygroupsid\n";
|
|
|
|
ldif += "-\nreplace: sambaprimarygroupsid\n";
|
|
|
|
ldif += "-\ntqreplace: sambapwdlastset\n";
|
|
|
|
ldif += "-\nreplace: sambapwdlastset\n";
|
|
|
|
ldif += "-\ntqreplace: sambakickofftime\n";
|
|
|
|
ldif += "-\nreplace: sambakickofftime\n";
|
|
|
|
ldif += "-\ntqreplace: sambalogontime\n";
|
|
|
|
ldif += "-\nreplace: sambalogontime\n";
|
|
|
|
ldif += "-\ntqreplace: sambalogofftime\n";
|
|
|
|
ldif += "-\nreplace: sambalogofftime\n";
|
|
|
|
ldif += "-\ntqreplace: sambapwdcanchange\n";
|
|
|
|
ldif += "-\nreplace: sambapwdcanchange\n";
|
|
|
|
ldif += "-\ntqreplace: sambapwdmustchange\n";
|
|
|
|
ldif += "-\nreplace: sambapwdmustchange\n";
|
|
|
|
ldif += "-\ntqreplace: sambauserworkstations\n";
|
|
|
|
ldif += "-\nreplace: sambauserworkstations\n";
|
|
|
|
ldif += "-\ntqreplace: sambadomainname\n";
|
|
|
|
ldif += "-\nreplace: sambadomainname\n";
|
|
|
|
ldif += "-\ntqreplace: sambamungeddial\n";
|
|
|
|
ldif += "-\nreplace: sambamungeddial\n";
|
|
|
|
ldif += "-\ntqreplace: sambabadpasswordcount\n";
|
|
|
|
ldif += "-\nreplace: sambabadpasswordcount\n";
|
|
|
|
ldif += "-\ntqreplace: sambabadpasswordtime\n";
|
|
|
|
ldif += "-\nreplace: sambabadpasswordtime\n";
|
|
|
|
ldif += "-\ntqreplace: sambadomainname\n";
|
|
|
|
ldif += "-\nreplace: sambadomainname\n";
|
|
|
|
if ( schemaversion > 0 ) {
|
|
|
|
if ( schemaversion > 0 ) {
|
|
|
|
ldif += "-\ntqreplace: sambapasswordhistory\n";
|
|
|
|
ldif += "-\nreplace: sambapasswordhistory\n";
|
|
|
|
ldif += "-\ntqreplace: sambalogonhours\n";
|
|
|
|
ldif += "-\nreplace: sambalogonhours\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ldif += "-\n";
|
|
|
|
ldif += "-\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -554,37 +554,37 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
|
|
|
|
|
|
|
|
|
|
|
|
if ( caps & Cap_Shadow ) {
|
|
|
|
if ( caps & Cap_Shadow ) {
|
|
|
|
if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
|
|
|
|
if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
|
|
|
|
if ( mod ) ldif += "tqreplace: shadowlastchange\n"; //sambapwdlastset
|
|
|
|
if ( mod ) ldif += "replace: shadowlastchange\n"; //sambapwdlastset
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowlastchange",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowlastchange",
|
|
|
|
TQString::number( timeToDays( user->getLastChange() ) ) ) + "\n";
|
|
|
|
TQString::number( timeToDays( user->getLastChange() ) ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: shadowmin\n"; //sambaPwdCanChange
|
|
|
|
if ( mod ) ldif += "-\nreplace: shadowmin\n"; //sambaPwdCanChange
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowmin",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowmin",
|
|
|
|
TQString::number( user->getMin() ) ) + "\n";
|
|
|
|
TQString::number( user->getMin() ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: shadowmax\n"; //sambaPwdMustChange
|
|
|
|
if ( mod ) ldif += "-\nreplace: shadowmax\n"; //sambaPwdMustChange
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowmax",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowmax",
|
|
|
|
TQString::number( user->getMax() ) ) + "\n";
|
|
|
|
TQString::number( user->getMax() ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: shadowwarning\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: shadowwarning\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowwarning",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowwarning",
|
|
|
|
TQString::number( user->getWarn() ) ) + "\n";
|
|
|
|
TQString::number( user->getWarn() ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: shadowinactive\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: shadowinactive\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowinactive",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowinactive",
|
|
|
|
TQString::number( user->getInactive() ) ) + "\n";
|
|
|
|
TQString::number( user->getInactive() ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: shadowexpire\n"; //sambaKickoffTime
|
|
|
|
if ( mod ) ldif += "-\nreplace: shadowexpire\n"; //sambaKickoffTime
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowexpire",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowexpire",
|
|
|
|
TQString::number( timeToDays( user->getExpire() ) ) ) + "\n";
|
|
|
|
TQString::number( timeToDays( user->getExpire() ) ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\ntqreplace: shadowflag\n";
|
|
|
|
if ( mod ) ldif += "-\nreplace: shadowflag\n";
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowflag",
|
|
|
|
ldif += KABC::LDIF::assembleLine( "shadowflag",
|
|
|
|
TQString::number( user->getFlag() ) ) + "\n";
|
|
|
|
TQString::number( user->getFlag() ) ) + "\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
if ( mod ) ldif += "-\n";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ( mod ) {
|
|
|
|
if ( mod ) {
|
|
|
|
ldif += "tqreplace: shadowlastchange\n";
|
|
|
|
ldif += "replace: shadowlastchange\n";
|
|
|
|
ldif += "-\ntqreplace: shadowmin\n";
|
|
|
|
ldif += "-\nreplace: shadowmin\n";
|
|
|
|
ldif += "-\ntqreplace: shadowmax\n";
|
|
|
|
ldif += "-\nreplace: shadowmax\n";
|
|
|
|
ldif += "-\ntqreplace: shadowwarning\n";
|
|
|
|
ldif += "-\nreplace: shadowwarning\n";
|
|
|
|
ldif += "-\ntqreplace: shadowinactive\n";
|
|
|
|
ldif += "-\nreplace: shadowinactive\n";
|
|
|
|
ldif += "-\ntqreplace: shadowexpire\n";
|
|
|
|
ldif += "-\nreplace: shadowexpire\n";
|
|
|
|
ldif += "-\ntqreplace: shadowflag\n";
|
|
|
|
ldif += "-\nreplace: shadowflag\n";
|
|
|
|
ldif += "-\n";
|
|
|
|
ldif += "-\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -630,7 +630,7 @@ void KUserLDAP::putData( KIO::Job *, TQByteArray& data )
|
|
|
|
if ( mDelUser ) {
|
|
|
|
if ( mDelUser ) {
|
|
|
|
kdDebug() << "delete ok for: " << mDelUser->getName() << endl;
|
|
|
|
kdDebug() << "delete ok for: " << mDelUser->getName() << endl;
|
|
|
|
mDelSucc.append( mDelUser );
|
|
|
|
mDelSucc.append( mDelUser );
|
|
|
|
if ( mObjectClasses.tqcontains( mDelUser ) ) {
|
|
|
|
if ( mObjectClasses.contains( mDelUser ) ) {
|
|
|
|
kdDebug() << "deleting additonal objectclasses!" << endl;
|
|
|
|
kdDebug() << "deleting additonal objectclasses!" << endl;
|
|
|
|
mObjectClasses.remove( mDelUser );
|
|
|
|
mObjectClasses.remove( mDelUser );
|
|
|
|
}
|
|
|
|
}
|
|
|
|