From 5980da83e7f99eab4cbfe31ff11afcec386adee5 Mon Sep 17 00:00:00 2001 From: sin Date: Mon, 9 Jun 2014 16:40:00 +0100 Subject: [PATCH] Add passwd manpage --- passwd.1 | 13 +++++++++++++ passwd.c | 2 +- su.1 | 4 ++-- su.c | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 passwd.1 diff --git a/passwd.1 b/passwd.1 new file mode 100644 index 0000000..bf860cb --- /dev/null +++ b/passwd.1 @@ -0,0 +1,13 @@ +.TH PASSWD 1 ubase-VERSION +.SH NAME +\fBpasswd\fR - Change a user's password +.SH SYNOPSIS +\fBpasswd\fR \fIusername\fR +.SH DESCRIPTION +\fBpasswd\fR changes the user's password. The user is prompted +for their current password. If the current password is correctly typed, +a new password is requested. The new password must be entered twice to +avoid typing errors. The superuser is not required to provide a user's +current password. +.SH BUGS +Currently there's no shadow support. diff --git a/passwd.c b/passwd.c index ebf1431..77d5209 100644 --- a/passwd.c +++ b/passwd.c @@ -15,7 +15,7 @@ static void usage(void) { - eprintf("usage: %s login\n", argv0); + eprintf("usage: %s username\n", argv0); } int diff --git a/su.1 b/su.1 index f028531..ddba3b3 100644 --- a/su.1 +++ b/su.1 @@ -2,13 +2,13 @@ .SH NAME \fBsu\fR - Run a command with a substitute user and group ID .SH SYNOPSIS -\fBsu\fR [\fB-lp\fR] [\fIuser\fR] +\fBsu\fR [\fB-lp\fR] [\fIusername\fR] .SH DESCRIPTION \fBsu\fR allows to run commands with a substitute user and group ID. When called without arguments, su defaults to running an interactive shell as root. For backward compatibility su defaults to not change the current directory and to only set the environment variables \fBHOME\fR and \fBSHELL\fR -(plus \fBUSER\fR and \fBLOGNAME\fR if target \fIuser\fR is not root). +(plus \fBUSER\fR and \fBLOGNAME\fR if the target \fIusername\fR is not root). .SH OPTIONS .TP \fB-l\fR diff --git a/su.c b/su.c index d9ec699..9b5f125 100644 --- a/su.c +++ b/su.c @@ -18,7 +18,7 @@ static int dologin(struct passwd *); static void usage(void) { - eprintf("usage: %s [-lp] [user]\n", argv0); + eprintf("usage: %s [-lp] [username]\n", argv0); } static int lflag = 0;