linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mário Gamito" <gamito@gmail.com>
To: linux-admin@vger.kernel.org
Subject: Creating password for command on the fly
Date: Fri, 16 May 2008 09:35:33 +0100	[thread overview]
Message-ID: <91df29a20805160135l2d811216rcecf9aa1ad8eee4e@mail.gmail.com> (raw)

Hi,

I have this command to create an FTP account:

# pure-pw useradd mario -u 502 -g 502 -n 1000 -N 200 -d /home/pages/gamito

This command asks for the password twice.

I need to pass the password (preferably without expect) so I can
create the account without prompting.

If i run:

# echo secret | pure-pw useradd mario -u 502 -g 502 -n 1000 -N 200 -d
/home/pages/gamito

It reads the first insertion, but asks for the second.

I knew how to do this a long time ago, but I've forgotten and couldn't
find anything useful on Google.

Any help would be appreciated.

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

             reply	other threads:[~2008-05-16  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16  8:35 Mário Gamito [this message]
2008-05-16  8:59 ` Creating password for command on the fly terry white
2008-05-16  9:12 ` Adam T. Bowen
2008-05-16  9:49 ` Carsten Aulbert

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=91df29a20805160135l2d811216rcecf9aa1ad8eee4e@mail.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 read-only IMAP folder(s) and NNTP newsgroup(s).