From: "Mário Gamito" <gamito@gmail.com>
To: linux-admin@vger.kernel.org
Subject: Change password with usermod
Date: Sat, 10 Mar 2007 10:42:28 +0000 [thread overview]
Message-ID: <45F28B94.5020800@gmail.com> (raw)
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
next reply other threads:[~2007-03-10 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-10 10:42 Mário Gamito [this message]
2007-03-10 10:56 ` Change password with usermod 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45F28B94.5020800@gmail.com \
--to=gamito@gmail.com \
--cc=linux-admin@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).