Re: Interactive Commands
| From: | Sylwester Zarębski | Date: | Fri, 27 Oct 2000 13:46:19 +0000 |
| Subject: | Re: Interactive Commands | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22329@lists.php.net to get a copy of this message | ||
Szii wrote:
>
> chpasswd is just something I made up, a command/script/program
> that I'd write if I was doing it a whole lot.
In RedHat Linux:
# rpm -qf /usr/sbin/chpasswd
shadow-utils-19990827-10
> TTY is a console connected to the machine. Most Un*x's will use
> "ptty" which are psudo-terminals - your machine which isn't physically
> connected to the machine but "virtually" connected via rsh, telnet, etc.
>
> passwd oldpass newpass doesn't work for the simple fact that passwd
> doesn't take command line parameters.
>
> Either create a zsh/csh/bash/tcsh/sh script called "chpasswd" and code
> the internals yourself to put them in the correct sequence, or...
>
> brick$ echo "oldpass\nnewpass\nnewpass | passwd"
You can't do this. Passwd awaits passwords exactly from
terminal/pseudo-terminal, thus you can't do this.
> if you want to specify a user...
>
> brick$ echo "oldpass\nnewpass\nnewpass | passwd someuser"
You can't do this. Like i said before.
> But to change someone else's pword you have to have root.
You're right.
--
pozdrawiam..
## ## | Sylwester Zarębski - ISP Group |
#### ## | e-mail: sylwek@isp.net.pl |
## ## ## | ICQ uin: #45780888 |
## #### ## | Administrator ISP.NET.PL |