[2935] in Kerberos-V5-bugs
krb5-admin/603: kadmin does not ID principal when asking for a password
daemon@ATHENA.MIT.EDU (Tom Perrine)
Fri May 29 16:59:54 1998
Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: bjaspan@MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, tep@SDSC.EDU
Date: Fri, 29 May 1998 13:52:59 -0700
From: Tom Perrine <tep@SDSC.EDU>
Reply-To: tep@SDSC.EDU
To: krb5-bugs@MIT.EDU
>Number: 603
>Category: krb5-admin
>Synopsis: kadmin does not ID principal when asking for a password
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bjaspan
>State: open
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Fri May 29 16:54:00 EDT 1998
>Last-Modified:
>Originator: Tom Perrine
>Organization:
San Diego Supercomputer Center, San Diego CA
>Release: krb5-1.0.5
>Environment:
System: SunOS galt 5.5.1 Generic_103640-18 sun4u sparc SUNW,Ultra-1
Architecture: sun4
>Description:
When the kadmin program prompts for a password, it
does not tell you which principal it is trying to use.
This can be confusing, especially with the inconsistent ways
"su" works on various UNIX flavors.
Linit announces the principal name, why not kadmin?
>How-To-Repeat:
Run kadmin, note that password prompt does not name a principal.
>Fix:
diff -r src.original/kadmin/cli/kadmin.c src/kadmin/cli/kadmin.c
172a173,176
> extern const char *krb5_default_pwd_prompt1;
> const char *oldprompt;
> char prompt[128];
>
375a380
>
380c385,386
< if (ccache_name)
---
> if (ccache_name) {
> fprintf(stdout, "kadmin: using principal \"%s\"\n",princstr);
387c393,395
< else if (use_keytab)
---
> }
> else if (use_keytab){
> fprintf(stdout, "kadmin: using principal \"%s\"\n",princstr);
394c402,408
< else
---
> }
> else {
> /* save old prompt string pointer,
> set it to my local area...*/
> oldprompt = krb5_default_pwd_prompt1;
> sprintf (prompt, "Password for %s: ",princstr);
> krb5_default_pwd_prompt1 = prompt;
400a415,417
> /* restore original prompt */
> krb5_default_pwd_prompt1 = oldprompt;
> }
>Audit-Trail:
>Unformatted: