Your SlideShare is downloading. ×
  • Like
Migrate linux user password to postfix vmail database
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Migrate linux user password to postfix vmail database

  • 464 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
464
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Migrate Linux User Password to Postfix Password Database (Migrar senha shadow parabanco PostgreSQL): 0) Crie todos os usuários do servidor de email antigo no novo, através de interface gráfica (CPANEL); 1) Pegar usuário e hash de senha no arquivo shadow: # cat /etc/shadow | cut –d “:” –f1-2 >> /tmp/hash_senha.txt 2) Jogar esse arquivo para o novo servidor email: scp –rv –P 22 /tmp/bash_senha.txt root@ip_da_maquina:/diretorio 3) No novo servidor, acesse o diretório onde o arquivo foi salvo. Crie um novo arquivo (ex.: update.sh) com o conteúdo abaixo: #!/bin/sh for x in `cat hash_senha.txt `;do usuario=`echo $x | cut -d ":" -f1`@dominio.com.br; senha=`echo $x | cut -d ":" -f2`; psql vmail -c "update mailbox set password = $senha where username = $usuario"; done 4) Salve e saia do arquivo. 5) Altere a permissão do update.sh # chmod +x update.sh 6) Executa o arquivo: # ./update.sh Carlos Eduardo Tecnologia da Informação Kadu137@hotmail.com