Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
286ecc5d
Commit
286ecc5d
authored
Dec 16, 2015
by
Côme Chilliet
Browse files
Fixes
#4380
Removing samba attributes in migrate-users if no samba class
parent
088b2239
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/bin/fusiondirectory-setup
View file @
286ecc5d
...
...
@@ -1175,7 +1175,8 @@ sub migrate_users {
if
(
ask_yn_question
("
Remove the gosaAccount objectClass from these entries?
"))
{
foreach
my
$entry
(
@entries
)
{
my
@replace
;
my
@replace
;
my
@delete
;
my
@classes
=
$entry
->
get_value
('
objectClass
');
if
(
grep
{
$_
eq
'
gosaAccount
'}
@classes
)
{
foreach
my
$class
(
@classes
)
{
...
...
@@ -1189,6 +1190,18 @@ sub migrate_users {
)
{
push
(
@replace
,
"
fdPersonalInfo
");
}
if
(
(
$entry
->
exists
('
sambaLMPassword
')
||
$entry
->
exists
('
sambaNTPassword
')
||
$entry
->
exists
('
sambaPwdLastSet
')
||
$entry
->
exists
('
sambaBadPasswordCount
')
||
$entry
->
exists
('
sambaBadPasswordTime
'))
&&
!
(
grep
{
$_
eq
'
sambaSamAccount
'}
@classes
)
)
{
@delete
=
('
sambaLMPassword
','
sambaNTPassword
','
sambaPwdLastSet
','
sambaBadPasswordCount
','
sambaBadPasswordTime
');
}
}
if
(
$@delete
>
0
)
{
$mesg
=
$ldap
->
modify
(
$entry
->
dn
(),
delete
=>
\
@delete
);
$mesg
->
code
&&
print
$mesg
->
error
;
}
$mesg
=
$ldap
->
modify
(
$entry
->
dn
(),
replace
=>
{
"
objectClass
"
=>
\
@replace
});
$mesg
->
code
&&
print
$mesg
->
error
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment