cambiar password de usuario sistema en modo batch

Wednesday, June 30th, 2010 @ 10:22 am | bash, Debian, linux, scripting, shell scripting

En Debian existe una forma cómoda de cambiar la password de root usando un script


echo “root:mipassword” | chpasswd

Así de simple.

Como añadido, os recomiendo usar apg ( apg – generates several random passwords ) muy cómod para generar passwords


apt-get intall apg

un ejemplo:


$ apg

Please enter some random data (only first 8 are significant)
(eg. your old password):>
kodThunOw1 (kod-Thun-Ow-ONE)
pivVabraf1 (piv-Vabr-af-ONE)
mivpicEv7 (miv-pic-Ev-SEVEN)
DeksuvLynk7 (Deks-uv-Lynk-SEVEN)
DiwrogAvLyb6 (Di-wrog-Av-Lyb-SIX)
pheFruanigs8 (phe-Fru-an-igs-EIGHT)

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

 

Recently

  • Cómo instalar dropbox en Debian usando los sources , copia y pega
  • Infección en apps de Android
  • virt-manager: ERROR:root:unsupported locale setting
  • sopastrike.com – Vamos a la huelga
  • No me gusta wordpress
  • [Asterisk] Tareas de mantenimiento
  • screengrab queda muerto
  • rails + omniauth + omniauth-twitter
  • Ruby on Rails + Papercliip: cannot load such file — cocaine (LoadError)
  • `autodetect’: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
  •