From: James Carlson <carlsonj@workingcode.com>
To: linux-ppp@vger.kernel.org
Subject: Re: How can one supply username & password combination on command line?
Date: Wed, 28 May 2014 11:59:21 +0000 [thread overview]
Message-ID: <5385CF99.40807@workingcode.com> (raw)
In-Reply-To: <CAJZVxRnUo7RtXmGNBE1xChQ4sqA+vrZKUpY7fr9ucbuo3JjAqQ@mail.gmail.com>
On 05/28/14 07:04, Aaron Lewis wrote:
> Is it possible to supply credentials on command line? So far the only
> way seems to be *-secrets file
>
> I need to find a way to launch PPTP & L2TP connections on command
> line, without modifying these files
>
> Any ideas?
Here's an idea from the fine manual:
password password-string
Specifies the password to use for authenticating to the peer. Use
of this option is discouraged, as the password is likely to be
visible to other users on the system (for example, by using ps(1)).
user name
Sets the name used for authenticating the local system to the peer
to name.
There are, of course, other ways to do this. Perhaps the most
straightforward way is to put the two options (and the respective
values) into a temporary file (or even a named pipe), and then use the
"file" option to read the options from that file. That way, the values
are not visible to other users, though the name of the file containing
them will be.
Another solution is to use the "passwordfd" plug-in that comes with
pppd. It allows you to supply the PAP password or CHAP passphrase via a
separate file descriptor (a pipe) that you pass to pppd. That's easy
and secure.
Still another solution is to write your own plug-in that gets the
required information from any source you like. Both passprompt.c and
passwordfd.c provide decent starting points, and are located in the
pppd/plugins/ directory in the source distribution.
As for LT2P itself, I'm not currently using it, and I don't know what
options there may be for the implementation you're using. (Note that
PPP is one thing that can be carried over L2TP, and that L2TP is a
substantial protocol of its own.)
--
James Carlson 42.703N 71.076W <carlsonj@workingcode.com>
prev parent reply other threads:[~2014-05-28 11:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 11:04 How can one supply username & password combination on command line? Aaron Lewis
2014-05-28 11:59 ` James Carlson [this message]
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=5385CF99.40807@workingcode.com \
--to=carlsonj@workingcode.com \
--cc=linux-ppp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.