Discussion:
[p4] p4 login password prompt
Dennis Wheeler
2011-03-04 19:32:40 UTC
Permalink
Thanks for everyone's suggestions on changing usernames. Looks like we have a few options.

I'm testing our LDAP trigger now, starting with the example script on the website 'p4authenticate.pl'

This default script reads the password from STDIN

But using this method, I have to enter my password in plain text on the console for a 'p4 login'. Then the password prompt is displayed afterward.

How do I get perforce to prompt for the password first (and so it isn't displayed in plain text), then pass it into the script? (I feel like this is a really stupid question that I should already know the answer, but just have a mental block today)

Thanks,
Ivey, William
2011-03-04 20:58:28 UTC
Permalink
Are you actually running this as a trigger? If so, you shouldn't see
anything different than when you usually run p4 login - the script's
actions are all behind the scenes.

The only way they would see the password is if your script made a
special effort to display it on stdout so the server would send it as
a message to the user.

-Wm

-----Original Message-----
From: perforce-user-***@perforce.com [mailto:perforce-user-***@perforce.com] On Behalf Of Dennis Wheeler
Sent: Friday, March 04, 2011 1:33 PM

Thanks for everyone's suggestions on changing usernames. Looks like we have a few options.

I'm testing our LDAP trigger now, starting with the example script on the website 'p4authenticate.pl'

This default script reads the password from STDIN

But using this method, I have to enter my password in plain text on the console for a 'p4 login'. Then the password prompt is displayed afterward.

How do I get perforce to prompt for the password first (and so it isn't displayed in plain text), then pass it into the script? (I feel like this is a really stupid question that I should already know the answer, but just have a mental block today)

Thanks,
Dennis Wheeler
2011-03-04 21:37:58 UTC
Permalink
That's what I thought too, but that's not what's happening. Here are my settings...

Triggers:
ldap auth-check auth "/users/dwheeler/p4-local/triggers/p4authenticate.pl %user%"

...
my $password = <STDIN>;
$password =~ s/\n//;
...

$ p4 -u dwheeler login
123456
Enter password:
User dwheeler logged in.
Subject: RE: [p4] p4 login password prompt
Date: Friday, March 4, 2011, 12:58 PM
Are you actually running this as a
trigger? If so, you shouldn't see
anything different than when you usually run p4 login - the
script's
actions are all behind the scenes.
The only way they would see the password is if your script
made a
special effort to display it on stdout so the server would
send it as
a message to the user.
-Wm
-----Original Message-----
On Behalf Of Dennis Wheeler
Sent: Friday, March 04, 2011 1:33 PM
Thanks for everyone's suggestions on changing usernames.
Looks like we have a few options.
I'm testing our LDAP trigger now, starting with the example
script on the website 'p4authenticate.pl'
This default script reads the password from STDIN
But using this method, I have to enter my password in plain
text on the console for a 'p4 login'. Then the password
prompt is displayed afterward.
How do I get perforce to prompt for the password first (and
so it isn't displayed in plain text), then pass it into the
script? (I feel like this is a really stupid question that I
should already know the answer, but just have a mental block
today)
Thanks,
Ivey, William
2011-03-04 23:52:27 UTC
Permalink
That looks as if your terminal is echoing it.

-Wm

-----Original Message-----
From: Dennis Wheeler [mailto:***@yahoo.com]
Sent: Friday, March 04, 2011 3:38 PM
To: Perforce User list; Ivey, William
Subject: RE: [p4] p4 login password prompt

That's what I thought too, but that's not what's happening. Here are my settings...

Triggers:
ldap auth-check auth "/users/dwheeler/p4-local/triggers/p4authenticate.pl %user%"

...
my $password = <STDIN>;
$password =~ s/\n//;
...

$ p4 -u dwheeler login
123456
Enter password:
User dwheeler logged in.
Dennis Wheeler
2011-03-05 16:03:02 UTC
Permalink
no matter how long I wait, the prompt doesn't appear until after I type the password

and, yes the terminal is echoing it, because its being entered before the prompt

--- On Fri, 3/4/11, sateesh vandavasi <***@gmail.com> wrote:

From: sateesh vandavasi <***@gmail.com>
Subject: Re: [p4] p4 login password prompt
To: "Dennis Wheeler" <***@yahoo.com>
Date: Friday, March 4, 2011, 3:26 PM

I believe, you are not waiting for password prompt.
wait couple of secs after running p4 login command.
Type password and it prompts .

Regards,
Sateesh

On Fri, Mar 4, 2011 at 1:37 PM, Dennis Wheeler <***@yahoo.com> wrote:

That's what I thought too, but that's not what's happening. Here are my settings...




Triggers:

       ldap auth-check auth "/users/dwheeler/p4-local/triggers/p4authenticate.pl %user%"



...

my $password = <STDIN>;

$password =~ s/\n//;

...



$ p4 -u dwheeler login

123456

Enter password:

User dwheeler logged in.
Subject: RE: [p4] p4 login password prompt
Date: Friday, March 4, 2011, 12:58 PM
Are you actually running this as a
trigger? If so, you shouldn't see
anything different than when you usually run p4 login - the
script's
actions are all behind the scenes.
The only way they would see the password is if your script
made a
special effort to display it on stdout so the server would
send it as
a message to the user.
-Wm
-----Original Message-----
On Behalf Of Dennis Wheeler
Sent: Friday, March 04, 2011 1:33 PM
Thanks for everyone's suggestions on changing usernames.
Looks like we have a few options.
I'm testing our LDAP trigger now, starting with the example
script on the website 'p4authenticate.pl'
This default script reads the password from STDIN
But using this method, I have to enter my password in plain
text on the console for a 'p4 login'. Then the password
prompt is displayed afterward.
How do I get perforce to prompt for the password first (and
so it isn't displayed in plain text), then pass it into the
script? (I feel like this is a really stupid question that I
should already know the answer, but just have a mental block
today)
Thanks,
Loading...