Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 1997 11:49:48 -0600 (MDT)
From:      Justin Ashworth <ashworth@esus.cs.montana.edu>
To:        Troy Settle <rewt@i-Plus.net>
Cc:        Doug White <dwhite@resnet.uoregon.edu>, questions@FreeBSD.ORG
Subject:   Re: Change another user's password?
Message-ID:  <Pine.OSF.3.95.970718112752.14892E-100000@esus.cs.montana.edu>
In-Reply-To: <199707181725.NAA02089@radford.i-plus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 18 Jul 1997, Troy Settle wrote:

> From: Justin Ashworth <ashworth@cs.montana.edu>
> >Doug White wrote:
> >> > Is there a way for one user to change another user's password?
> >> The superuser can run 'passwd user' to change user's password.
> >else's password without knowing the original password. I need a way for
> >the passwd program to prompt the user for the old password before
> >assigning a new one and as far as I know, that can't be done by running
> >passwd as root.
> 
> su isn't just to gain root access.  You can also su to another user.  Do
> this, then run passwd to change the user's password.

  This is where I was unclear in my previous message. I know it's possible
to su to different users, but these users cannot change their own
passwords because of their restricted shells, making the script also
incapable of changing the user's password by logging in as that user. 
Ideally the script will be run as setuid chpasswd, a dummy user with shell
access (vs. running as nobody...who has no shell access), to change the
password. Even if I have chpasswd su to root, when I run passwd I won't be
prompted for the old password before entering a new one. This is where I
run into the problem of any user being able to change another user's
password. So...if I can get the chpasswd user to change another user's
password, I will be set. Can it be done?

Thanks...

- Justin Ashworth
-- ashworth@cs.montana.edu
- http://www.cs.montana.edu/~ashworth




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95.970718112752.14892E-100000>