Use err(3). Mdoc'ify man page.
This commit is contained in:
parent
955bc15107
commit
34d890bafe
@ -1,64 +1,82 @@
|
||||
.ll 6i
|
||||
.pl 10.5i
|
||||
.\" @(#)keyinit.1 1.0 (Bellcore) 7/20/93
|
||||
.\"
|
||||
.lt 6.0i
|
||||
.TH KEYINIT 1 "20 July 1993"
|
||||
.AT 3
|
||||
.SH NAME
|
||||
keyinit \- Change password or add user to S/Key authentication system.
|
||||
.SH SYNOPSIS
|
||||
.B keyinit [\-s] [<user ID >]
|
||||
.SH DESCRIPTION
|
||||
.I keyinit
|
||||
.Dd July 20, 1993
|
||||
.Dt KEYINIT 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm keyinit
|
||||
.Nd change password or add user to S/Key authentication system
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl s
|
||||
.Op Ar userID
|
||||
.Sh DESCRIPTION
|
||||
.Nm Keyinit
|
||||
initializes the system so you can use S/Key one-time passwords to
|
||||
login. The program will ask you to enter a secret pass phrase; enter a
|
||||
phrase of several words in response. After the S/Key database has been
|
||||
updated you can login using either your regular UNIX password or using
|
||||
S/Key one-time passwords.
|
||||
.PP
|
||||
.Pp
|
||||
When logging in from another machine you can avoid typing a real
|
||||
password over the network, by typing your S/Key pass phrase to the
|
||||
\fIkey\fR command on the local machine: the program will respond with
|
||||
.Nm key
|
||||
command on the local machine: the program will respond with
|
||||
the one-time password that you should use to log into the remote
|
||||
machine. This is most conveniently done with cut-and-paste operations
|
||||
using a mouse. Alternatively, you can pre-compute one-time passwords
|
||||
using the \fIkey\fR command and carry them with you on a piece of paper.
|
||||
.PP
|
||||
\fIkeyinit\fR requires you to type your secret password, so it should
|
||||
using the
|
||||
.Nm key
|
||||
command and carry them with you on a piece of paper.
|
||||
.Pp
|
||||
.Nm Keyinit
|
||||
requires you to type your secret password, so it should
|
||||
be used only on a secure terminal. For example, on the console of a
|
||||
workstation. If you are using \fIkeyinit\fR while logged in over an
|
||||
untrusted network, follow the instructions given below with the \-s
|
||||
workstation. If you are using
|
||||
.Nm
|
||||
while logged in over an
|
||||
untrusted network, follow the instructions given below with the
|
||||
.Fl s
|
||||
option.
|
||||
.SH OPTIONS
|
||||
.IP \-s
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width indent
|
||||
.It Fl s
|
||||
Set secure mode where the user is expected to have used a secure
|
||||
machine to generate the first one time password. Without the \-s the
|
||||
machine to generate the first one time password. Without the
|
||||
.Fl s
|
||||
the
|
||||
system will assume you are direct connected over secure communications
|
||||
and prompt you for your secret password.
|
||||
The \-s option also allows one to set the seed and count for complete
|
||||
control of the parameters. You can use keyinit -s in combination with
|
||||
The
|
||||
.Fl s
|
||||
option also allows one to set the seed and count for complete
|
||||
control of the parameters. You can use
|
||||
.Nm
|
||||
.Fl s
|
||||
in combination with
|
||||
the
|
||||
.I key
|
||||
.Nm key
|
||||
command to set the seed and count if you do not like the defaults.
|
||||
To do this run keyinit in one window and put in your count and seed
|
||||
then run key in another window to generate the correct 6 English words
|
||||
To do this run
|
||||
.Nm
|
||||
in one window and put in your count and seed
|
||||
then run
|
||||
.Nm key
|
||||
in another window to generate the correct 6 English words
|
||||
for that count and seed. You can then
|
||||
"cut" and "paste" them or copy them into the keyinit window.
|
||||
.sp
|
||||
.LP
|
||||
.B <user ID>
|
||||
the ID for the user to be changed/added
|
||||
.SH DIAGNOSTICS
|
||||
.SH FILES
|
||||
.TP
|
||||
/etc/skeykeys data base of information for S/Key system.
|
||||
.SH BUGS
|
||||
.LP
|
||||
.SH SEE ALSO
|
||||
.BR skey(1),
|
||||
.BR key(1),
|
||||
.BR su(1),
|
||||
.BR keyinfo(1)
|
||||
.SH AUTHOR
|
||||
"cut" and "paste" them or copy them into the
|
||||
.Nm
|
||||
window.
|
||||
.It Ar userID
|
||||
The ID for the user to be changed/added
|
||||
.El
|
||||
.Sh FILES
|
||||
.Pa /etc/skeykeys
|
||||
data base of information for S/Key system.
|
||||
.Sh SEE ALSO
|
||||
.Xr key 1 ,
|
||||
.Xr keyinfo 1 ,
|
||||
.Xr skey 1 ,
|
||||
.Xr su 1
|
||||
.Sh AUTHOR
|
||||
Command by Phil Karn, Neil M. Haller, John S. Walden
|
||||
|
@ -1,15 +1,16 @@
|
||||
/* change password or add user to S/KEY authentication system.
|
||||
* S/KEY is a tradmark of Bellcore */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <skey.h>
|
||||
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
#include <unistd.h>
|
||||
|
||||
#define NAMELEN 2
|
||||
|
||||
@ -163,10 +164,8 @@ char *argv[];
|
||||
strcpy(seed,defaultseed);
|
||||
|
||||
/* Crunch seed and password into starting key */
|
||||
if(keycrunch(key,seed,passwd) != 0){
|
||||
fprintf(stderr,"%s: key crunch failed\n",argv[0]);
|
||||
return 1;
|
||||
}
|
||||
if(keycrunch(key,seed,passwd) != 0)
|
||||
errx(1, "key crunch failed");
|
||||
nn = n;
|
||||
while(nn-- != 0)
|
||||
f(key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user