Sponsored Content
Top Forums Shell Programming and Scripting Script to change UNIX password Post 20165 by hugo_perez on Monday 22nd of April 2002 03:38:26 PM
Old 04-22-2002
The expect tool is a powerfull tool and can be used to automate diferents jobs, you need to use your imagination to give him the
benefits of install this tool.

ANYWAY you only need to install the tool in one server that have connectivity to the others.


from your development server


ksh script change_passwd.sh

#!/bin/ksh
for server in server1 server2 server3 ... servern
do
expect -f my_expect1 $server <login_name> $1 $2
sleep 5
done

----
call ./change_passwd.sh <old_passwd> <new_passwd>

Regards, Hugo.

Last edited by hugo_perez; 04-22-2002 at 05:04 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Change password script in Unix easily..

I have more than 50 server unix's password need to change, usually I assign one password for all hosts, for easy remember, but I need to change password every two months..it's very tried to change password every 2 months, is there any unix script that can change password easily? ie ' script... (4 Replies)
Discussion started by: zp523444
4 Replies

2. Shell Programming and Scripting

script/program to change the password ?

hi, Somebody have or known where i can find a perl small perl program to change the password. The point: First it verify is the user exist, checking the old typed password and replace it with new. The passwords must be encoded. Thanks, very much! (0 Replies)
Discussion started by: kad
0 Replies

3. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

4. UNIX for Dummies Questions & Answers

Where to change the UNIX password prompt?

Hi guys, I got these 3 servers: a, b and c which I ssh from a to b/c. a:$ ssh userid@b Password: a:$ ssh userid@c userid@c's password: Notice that the password prompt is different (highlighted in bold) on both servers even though their SUN Solaris version the same, OpenSSH version... (0 Replies)
Discussion started by: DrivesMeCrazy
0 Replies

5. Shell Programming and Scripting

Unix script to change password

Hello Gurus I have little challenge which I do not know how to address it. I have unix account on many servers (let's say over 25). These accounts expire every 60 days. Is there scripts that I can run from my "local computer" and pass a new password to it where it would change it for me on all... (7 Replies)
Discussion started by: nimo
7 Replies

6. HP-UX

Automatic script to change the UNIX Password

Hi, we have around 50 users and every month we need to change the password manually once its expire. do we have any script to change the password automatically. OS -HP-UX Thanks in advance.. (6 Replies)
Discussion started by: periyasamycse
6 Replies

7. Shell Programming and Scripting

Script to change password in UNIX

Hi Friends, Every morning i need to change the password, please advise how it can be automated. I am having pre planned password list for 4 months which can be used as input file for new passwords. Thanks (28 Replies)
Discussion started by: rajjev_saini123
28 Replies

8. Shell Programming and Scripting

A script to change password for all other servers

Hey Gurus, I have this requirement to change the password for other servers remotely from one server. So, I installed public keys on all servers and wrote the following script to do the job. Something appears to be wrong with my loop, as it only changes one server and ignores the rest. I'm... (24 Replies)
Discussion started by: Hiroshi
24 Replies

9. Shell Programming and Scripting

Shell script to change the password

Hi Folks, I am trying to change the password for the user "sysservice" Where my requirement is login to each server and exit from that and ssh to the next server.. I have enabled the password less auth for the user sysservice. for i in `cat /home/sysservice/servers.txt` do ssh... (1 Reply)
Discussion started by: gsiva
1 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies
ATTILA(1)						  Alliance - attila User's Manual						 ATTILA(1)

NAME
attila - A Tool Installer SYNOPSIS
attila [ -h ] [ -S ] [ -U ] [ -F ] [ -A ] [ --help ] [ --ssh ] [ --user ] [ --asim ] [ --prefix=INSTALL_DIR ] [ --builddir=BUILD_DIR ] --tool=name1 [ --tool=name2... ] [ -c- configure_arg1 [ configure_arg2 ... ] ] [ -m- make_arg1 [ make_arg2... ] ] DESCRIPTION
attila automates the process of compiling and installing one or more Alliance tools. The tool can be installed either in the user's account (during the devellopment stage) or in the Alliance system wide tree (for instance /asim/alliance) when a new version is made avalaible to all. attila proceed with the following steps : 1. Checks if the sources of tools are present in the user's account. If not, check them out from the Alliance CVS tree. Note that you must have access to it. 2. In case of --asim or --full installations, attila will fork itself on one Linux computer (currently bip) and on one Solaris computer (beny). As to connect on thoses computer it will uses rsh so you must setup your ~/.rhosts to access them whithout passwords. You also can uses ssh (but the procedure to allow automatic login is more complicated). 3. Run autostuff for the tool in the ~/alliance/src directory. 4. Run configure in the build directory (see below). 5. Install the tool in the local install directory (see below) or in the system-wide Alliance directory rooted under /asim/alliance. After an --asim install: the build directory tree of the tool will be removed to avoid messing with further local installations. DIRECTORY STRUCTURE attila relies on the following tree structure : (all paths below are given relative to the user's home directory) o ~/alliance/src where the tools sources are to be found. o ~/alliance/Linux/build/$TOOL : the top directory under which the tool will be compiled for Linux. This is where the configure script will be run. o ~/alliance/Linux/install : the top of the install tree when the tool is compiled locally for Linux. Under this directory you will found (at least) : ./bin, ./lib and ./include. o ~/alliance/Solaris/build/$TOOL : the tool's build directory for Solaris. o ~/alliance/Solaris/install : top of the local install tree for Solaris. CVS CHECKOUT If the sources of the requested tool(s) are not found under ~/alliance/src/ attila will try to check them out. So, as says above, you must have access rights to the Alliance CVS tree. In addition to the tool(s) sources, it will also checks for the minimal set of files needed for configure to run. As for now : o autostuff o alliance.m4 o motif.m4 o Makefile.am GUESSING CVSROOT The root of the CVS tree will be set according to the following rules : 1. Uses the user's environment variable CVSROOT if sets. 2. Uses the attila default value sets in attila.conf (variable ATTILA_CVSROOT). GUESSING ALLIANCE_TOP The root of the Alliance installed distribution tree will be set according to the following rules : 1. Uses the user's environment variable ALLIANCE_TOP if sets. 2. Uses the attila default value sets in attila itself (variable ATTILA_ALLIANCE_TOP). ALLIANCE_TOP: is set in attila itself because its value is a prerequisite to load the configuration file attila.conf which is in the directory $ALLIANCE_TOP/etc/. ARGUMENTS
attila accepts the followings arguments : o -h, --help : print help. o -S, --ssh : uses ssh instead of rsh to connect to the remote computers (in case of --asim or --full). o -U, --user : perform a local installation. o -F, --full : install for all avalaibles architectures (currently Linux and Solaris). o -A, --asim : install in the system-wide directory (/asim/alliance). o --prefix=INSTALL_DIR : override the default installation directory. o --builddir=BUILD_DIR : override the default building directory. o --tool=name1 : name of the tool to be installed. o -c- configure_arg1 : all arguments following -c- (until a -m- is encountered) are passed as is to the subsequent call to configure. For example, if you want to first use your local libraries, give --enable-devel. If you want to link or install dynamic libraries, give --enable-alc-shared for alliance libraries and give --enable-shared for other libraries. o -m- make_arg1 : all arguments following -m- are passed as is to the subsequent call to make. If no -m- argument is given, then install is assumed. If you want to completly uninstall a tool and clean it's build directory you can pass uninstall clean CONFIGURATION FILE ATTILA.CONF The configuration file is located in $ALLIANCE_TOP/etc. This file is to be read by the sh shell. It sets up the following variables : o LINUX_TARGET : the computer where to compile for the Linux architecture (default bip). o LINUX_CC : the name or full path to to the C compiler for Linux system (default gcc3). o LINUX_CXX : the name or full path to to the C++ compiler for Linux system (default g++3). o SOLARIS_TARGET : the computer where to compile for the Solaris architecture (default beny). o SOLARIS_CC : the name or full path to to the C compiler for Solaris system (default /usr/local/gcc-3.0.4/bin/g++3). o SOLARIS_CXX : the name or full path to to the C++ compiler for Solaris system (default /usr/local/gcc-3.0.4/bin/g++3). o ATTILA_CVSROOT : the root of the Alliance CVS tree (default /users/outil/alliance/cvsroot). o CVS_STARTUP_FILES : the minimal set of files needed to run configure. EXAMPLES
Compile & install nero tool on the local computer (must be either a Linux or a Solaris one) : $ attila --tool=nero Compile & install nero tool for all architectures (currently only Linux and Solaris are supported) : $ attila --full --tool=nero Compile & install nero tool in the system-wide directory (a new version for everyone to use) : $ attila --asim --tool=nero Compile & install mbk then genlib (the order is significant) in a row for a local install on the current computer : $ attila --tool=mbk --tool=genlib Compile nero tool and link it against the locally installed libraries (if any). $ attila --tool=nero -c- --enable-devel Remove poire tool from the system-wide tree. (poire is the old name of nero). $ attila --asim --tool=poire -m- uninstall ASIM
/LIP6 13 October 2002 ATTILA(1)
All times are GMT -4. The time now is 03:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy