From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?M=E1rio_Gamito?= Subject: Change password with usermod Date: Sat, 10 Mar 2007 10:42:28 +0000 Message-ID: <45F28B94.5020800@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="iso-8859-1"; format="flowed" To: linux-admin@vger.kernel.org Hi, I'm trying to set a password directly from a script, using usermod, but= =20 i get an error, i shouldn't get: #!Bin/bash groupadd postgres useradd -g postgres postgres PASS=3D`mkpasswd secret` ID=3D`cat /etc/passwd | grep postgres | cut -f3 -d':'` usermod -p $PASS -u $ID This gives me: "usermod: user 502 does not exist" But the odd thing is that it exists with that uid. Any ideas ? Warm Regards, M=E1rio Gamito - To unsubscribe from this list: send the line "unsubscribe linux-admin" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html