supongamo que el archivo tiene estas lineas
usuario contraseña nombre_real
(pepe) 1234 Ariel fernandez
que lineas agrego al script para que me pase lo nombres reales tambien ??
Gracias
2006/7/27, Ariel <[EMAIL PROTECTED]>:
Muchisimas gracias.. lo voy a probar y te aviso
SaludosEl día 27/07/06, Samuel Díaz García < [EMAIL PROTECTED] > escribió:Créate un fichero con las líneas que hay entre el comienzo y el final.
Puede que te ayude en algo, quizás tengas que retocar un poco para
ajustarlo a tu sistema, pero, al menos, tienes una base.
--- COMIENZO ---
#!/bin/bash
#Se supone fichero CSV cuyo primer campo es el nombre de usuario
#y el segundo la contraseña.
fichero=<pon aquí tu fichero de texto>
#dejar dominio vacío si está ya incluido en el nombre de usuario
dominio=
for linea in `cat $fichero`; do
usuario=`echo ${linea} | cut -d "," -f 1`;
clave=`echo ${linea} | cut -d "," -f 2`;
if [ $dominio == "" ]; then
/home/vpopmail/bin/vadduser ${usuario} ${clave}
else
/home/vpopmail/bin/vadduser [EMAIL PROTECTED] ${clave}
fi;
done;
--- FIN ---
Salu2
Ariel escribió:
> correcto.. pero es posible levantar los datos desde un archivo txt o csv ?
>
>
> 2006/7/27, Natalio Gatti < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
>
> On 7/27/06, Ariel < [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>> wrote:
> >
> > Hello it is the first message to the list, and I really do not write
> > anything of English, I am going to try to use a
> translator. But m i
> > consults has a .txt file with 900 users and passwords in text
> sure and needs
> > to know if form exists to directly pass them to the vpopmail, of
> a single
> > step not tipiando of a one.
> > Gracias
> >
> >
> >
> >
> >
> >
> > Hola es el primer mensaje a la lista, y realmente no escribo nada
> de ingles,
> > voy a tratar de utilizar un traductor.
> >
> > Pero m i consulta es
> >
> > tengo un archivo .txt con 900 usuarios y contraseñas en texto
> claro, y
> > necesito saber si existe forma de pasarlos directamente al
> vpopmail , de un
> > solo paso no tipiando de a uno.
> >
> > Gracias
> >
> >
>
> ** Spanish:
> Podes usar un script via linea de comandos. Para crear un usuario
> tenes el comando /home/vpopmail/bin/vadduser
>
> ** English
> You can create a script via CLI. You can use comando
> /home/vpopmail/bin/vadduser to create users.
>
> Salutti,
>
> Natalio
>
> ---------------------------------------------------------------------
> QmailToaster hosted by: VR Hosted < http://www.vr.org>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED] >
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>
>
>
--
Samuel Díaz García
Director Gerente
ArcosCom Wireless, S.L.L.
CIF: B11828068
c/ Romero Gago, 19
Arcos de la Frontera
11630 - Cadiz
http://www.arcoscom.com
mailto: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]
Móvil: 651 93 72 48
Tlfn.: 956 70 13 15
Fax: 956 70 34 83
---------------------------------------------------------------------
QmailToaster hosted by: VR Hosted < http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]