Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 1997 11:49:48 -0600 (MDT)
From:      Justin Ashworth <>
To:        Troy Settle <>
Cc:        Doug White <>, questions@FreeBSD.ORG
Subject:   Re: Change another user's password?
Message-ID:  <>
In-Reply-To: <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Fri, 18 Jul 1997, Troy Settle wrote:

> From: Justin Ashworth <>
> >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?


- Justin Ashworth

Want to link to this message? Use this URL: <>