chpasswd will do exactly what you want.

Ernest Johanson
Systems Administrator
Fuller Theological Seminary


On Tue, 16 Dec 2003, James Williamson wrote:

> Date: Tue, 16 Dec 2003 07:10:13 +0000
> From: James Williamson <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Change password from shellscript
> 
> On Monday 15 Dec 2003 7:04 pm, Peter wrote:
> > Howdie,
> >
> > I want to make a shellscript with the ability to change a
> > userspassword. I can't get it to work properly because when i say
> > passwd user i will have to enter the password is there a way or a
> > switch todo this in a style like passwd user password
> 
> My version of passwd has a --stdin switch which'll read the=20
> password from STDIN, i.e.
> 
> echo $password | passwd --stdin $username
> 
> If your's doesn't you may want to take a look at expect.
> 
> James
> 
> >
> > Thankz,
> > Peter
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to