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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Migrate linux user password to postfix vmail database

502

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
502
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
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

×