[SOLVED] Move passwords from /etc/shadow to zimbra Hello,
I'm trying to use this script from the wiki to get the shadow's password and put it into zimbra ldap, but it's not working.
Script from wiki:
#!/usr/bin/perl
# Usage: as root # ./shadow2zm.pl /etc/shadow > shadow.zm
# as zimbra # zmprov < shadow.zm
$domain="my.domain.com";
while(<>) {
chomp;
my ($uname,$pass) = split(/:/);
print qq{zmprov ma $uname\@$domain userPassword '{crypt}$pass'\n};
print qq{\n};
}
The first command runs withou problems ( ./shadow2zm.pl /etc/shadow > shadow.zm)
But when I try to execute the second command with zimbra user(zmprov < shadow.zm) its prompt to me several messages like this:
prov> Unknown command. Type: 'help commands' for a list
prov> Unknown command. Type: 'help commands' for a list
prov> Unknown command. Type: 'help commands' for a list
prov> Unknown command. Type: 'help commands' for a list
And the password from the file shadow.zm was not apllyed.
Can anyone give me a hint? |