Redirect output of 'passwd' command

March 30, 2009 at 03:34:30
Specs: unix
Hi frens,
How do I redirect all the o/p lines of 'passwd'
command and at the same time give my own
prompt lines to the user
ie. I just want to replace the following lines-

Changing password for user mahesh.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:

-with my own.


See More: Redirect output of passwd command

Report •

March 30, 2009 at 06:18:33
first, sudo to root, then you can do without the prompt. or you can check out the --stdin option. check the man page

Report •
Related Solutions

Ask Question