|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a large number of remote hosts accessed using ssh.
I would like to create a script to change the root passwd on these hosts periodically I have tried using the following hereis file with not much luck file: /bin/passwd root << eof oldpasswd newpasswd eof Appreciate some advice Sammy |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Ps
I'm aware of yellowpages and similar applications but I would like to automate using a shell or possible perl script. "sammy" <kim111@bigpond.net.au> wrote in message news:2indh.3199$HU.2704@news-server.bigpond.net.au... >I have a large number of remote hosts accessed using ssh. > > I would like to create a script to change the root passwd on these hosts > periodically > > I have tried using the following hereis file with not much luck > > file: > > /bin/passwd root << eof > oldpasswd > newpasswd > eof > > Appreciate some advice > > Sammy > |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
sammy schrieb: > Ps > I'm aware of yellowpages and similar applications but I would like to > automate using a shell or possible perl script. > > "sammy" <kim111@bigpond.net.au> wrote in message > news:2indh.3199$HU.2704@news-server.bigpond.net.au... > >I have a large number of remote hosts accessed using ssh. > > > > I would like to create a script to change the root passwd on these hosts > > periodically > > > > I have tried using the following hereis file with not much luck > > > > file: > > > > /bin/passwd root << eof > > oldpasswd > > newpasswd > > eof > > > > Appreciate some advice > > > > Sammy > > Note that passwd wants to do some ioctl on the tty to disable echoing. scripting tty is done by expect (you have to use TCL). Changing the passwd is not complicated here. Look http://www.ale.org/archive/ale/ale-2.../msg00583.html The expect script can then be started by ssh. Hubble. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Tue, 05 Dec 2006 23:30:06 GMT, sammy
<kim111@bigpond.net.au> wrote: > I have a large number of remote hosts accessed using ssh. > > I would like to create a script to change the root passwd on these hosts > periodically > > I have tried using the following hereis file with not much luck > > file: > > /bin/passwd root << eof > oldpasswd > newpasswd > eof > For security reasons, the passwd command does not use standard input. You need expect if you are going to use passwords and use a script to change them. You might also consider using NIS or LDAP, or using ssh with public and private keys instead of passwords. -- I'll be comfortable on the couch. Famous last words. -- Lenny Bruce |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Tue, 05 Dec 2006 23:30:06 +0000, sammy wrote:
> I have a large number of remote hosts accessed using ssh. > > I would like to create a script to change the root passwd on these hosts > periodically > > I have tried using the following hereis file with not much luck > > file: > > /bin/passwd root << eof > oldpasswd > newpasswd > eof > > Appreciate some advice chpasswd ought to do it. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
sammy <kim111@bigpond.net.au> wrote:
> I have a large number of remote hosts accessed using ssh. > > I would like to create a script to change the root passwd on these hosts > periodically > > I have tried using the following hereis file with not much luck > > file: > > /bin/passwd root << eof > oldpasswd > newpasswd > eof > > Appreciate some advice You might want to consider changing the hash in /etc/shadow or an equivalent file. -- Kenan Kalajdzic |
|
![]() |
| Outils de la discussion | |
|
|