linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Change password with usermod
@ 2007-03-10 10:42 Mário Gamito
  2007-03-10 10:56 ` Mário Gamito
  2007-03-10 11:55 ` Krzysztof Dubowik
  0 siblings, 2 replies; 6+ messages in thread
From: Mário Gamito @ 2007-03-10 10:42 UTC (permalink / raw)
  To: linux-admin

Hi,

I'm trying to set a password directly from a script, using usermod, but 
i get an error, i shouldn't get:

#!Bin/bash
groupadd postgres
useradd -g postgres postgres
PASS=`mkpasswd secret`
ID=`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ário 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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Change password with usermod
@ 2007-03-10  9:53 Mário Gamito
  0 siblings, 0 replies; 6+ messages in thread
From: Mário Gamito @ 2007-03-10  9:53 UTC (permalink / raw)
  To: linux-admin

Hi,

I'm trying to set a password directly from a script, using usermod, but 
i get an error, i shouldn't get:

#!Bin/bash
groupadd postgres
useradd -g postgres postgres
PASS=`mkpasswd secret`
ID=`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ário 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-10 21:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-10 10:42 Change password with usermod Mário Gamito
2007-03-10 10:56 ` Mário Gamito
2007-03-10 11:55 ` Krzysztof Dubowik
2007-03-10 12:05   ` Mário Gamito
2007-03-10 21:42   ` Ian Ward Comfort
  -- strict thread matches above, loose matches on Subject: below --
2007-03-10  9:53 Mário Gamito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).