On Mon, Sep 01, 2003 at 03:42:55PM -0600, Jonathan Chaves Avalos wrote:

 > Como puedo hacer un script  para que cambiar el shell de los usuarios
 > osea que en /etc/passwd los que tengan /bin/bash ponerles /bin/false

 No lo he probado, si se rompe pod�s conservar los dos pedazos...

$ perl -le 'while (@pw = getpwent()) { $pw[8] eq "/bin/bash" && print $pw[0] }'

 Eso son los usuarios cuyo shell es /bin/bash

 Luego nada m�s ten�s que cambiarel shell:

perl -le 'while (@pw = getpwent()) { $pw[8] eq "/bin/bash" && print $pw[0] }' |
while read u ; do chsh -s /bin/false $u ; done

-- 
Marcelo

-- 
Desuscripci�n: escriba a [EMAIL PROTECTED], tema 'unsubscribe'
Problemas a: [EMAIL PROTECTED]  http://www.linux.or.cr/listas

Responder a