Sponsored Content
Top Forums Shell Programming and Scripting Shell script to connect to multiple ssh servers Post 302668279 by PikK45 on Monday 9th of July 2012 05:34:48 AM
Old 07-09-2012
What have you done?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell/perl script to connect to different servers in single login in teradata

Hi, I want to write a shell script to compare two tables in teradata.these tables are present on different servers. I want to connect to both servers in single login in order to fetch and compare the data in one go. Thanks (1 Reply)
Discussion started by: monika
1 Replies

2. Shell Programming and Scripting

shell script for how to connect to a remote server by using ssh

i want to connect to a remote server through ssh. i have to also provide password within that script. after connecting to the remote server i want to do some operations like grep,cd etc can u pls help me to wite a script. Thanks (1 Reply)
Discussion started by: millan
1 Replies

3. Shell Programming and Scripting

Connect two servers in shell script

Hello all, I know that is a question which has made too many times, and I have been looking into the threads but all posted was not sucessfully for me so... I need a shell script which connect two unix servers, but NOT using ssh... Is there another way to do it? I've tried ssh but it didn't... (1 Reply)
Discussion started by: Geller
1 Replies

4. Shell Programming and Scripting

connect to multiple servers using SSH and execute commands

Requirement: Run a shell script with below inputs file name checksum path the script should go to multiple servers (around 35) and verify the input cksum and if there is a mismatch display a simple message to the user that cksum verification failed. host details, user id /... (1 Reply)
Discussion started by: amicableperson
1 Replies

5. Shell Programming and Scripting

Shell script to change the password on multiple servers in linux

Can any one please let me know the shell script to change the password for a particular user on multiple linux servers. (2 Replies)
Discussion started by: s_madras
2 Replies

6. Shell Programming and Scripting

Script to add new users to a group on multiple servers using SSH

Hi Experts, I am new to scripting. We have around 400 Linux servers in our environment. I want to add a new user to a perticular group on all the servers using SSH. Requirements: 1) Need to take the server names from a text file. 2) Login into each server and check whether perticular... (1 Reply)
Discussion started by: Satya1983
1 Replies

7. UNIX for Dummies Questions & Answers

How can we connect multiple servers at a time?

help me (0 Replies)
Discussion started by: sonu pandey
0 Replies

8. Shell Programming and Scripting

Shell script to ping multiple servers

Hi I did the following script to ping multiple servers, but I keep on receiveing duplicate emails for one server that is down: #!/bin/bash date cat /var/tmp/servers.list | while read output do ping -c 1 "$output" > /dev/null if ; then echo "node $output is up" else ... (10 Replies)
Discussion started by: fretagi
10 Replies

9. Shell Programming and Scripting

Shell script for connecting multiple servers and then copying 30 days old files

Shell script for connecting multiple servers and then copying 30 days old files from those server . HI , I have 6 multiple servers pla1,pla2,pla3,pla4,pla5,pla6 1. These six servers have common shared mount point /var/share 2. Running script from /var/share to connect these servers.I... (1 Reply)
Discussion started by: rcroyal88
1 Replies

10. UNIX for Beginners Questions & Answers

Assistance to connect to servers via ssh once and collect various commands into separate variables

Hello, We use as bash script to connect to servers listed in an .csv file to issue commands against these servers and retrieve data to be saved in a .csv file. The data we want to collect is saved in variables. We issue an ssh command for each variable we want to capture. I'm thinking this is... (9 Replies)
Discussion started by: greavette
9 Replies
CHPASS(1)						    BSD General Commands Manual 						 CHPASS(1)

NAME
chpass, chfn, chsh, -- add or change user database information SYNOPSIS
chpass [-a list] [-p encpass] [-e expiretime] [-s newshell] [user] DESCRIPTION
The chpass utility allows editing of the user database information associated with user or, by default, the current user. The chfn, and chsh utilities behave identically to chpass. (There is only one program.) The information is formatted and supplied to an editor for changes. Only the information that the user is allowed to change is displayed. The options are as follows: -a The super-user is allowed to directly supply a user database entry, in the format specified by passwd(5), as an argument. This argu- ment must be a colon (``:'') separated list of all the user database fields, although they may be empty. [Note that this only changes the user database, master.passwd.] -p The super-user is allowed to directly supply an encrypted password field, in the format used by crypt(3), as an argument. [See the discussion in getpwent(3) about types of passwords; this option may not be appropriate.] -e expiretime Change the account expire time. This option is used to set the expire time from a script as if it was done in the interactive edi- tor. -s newshell Attempt to change the user's shell to newshell. Possible display items are as follows: Login: user's login name Password: user's encrypted password [do not use this to change a password; use passwd(1) instead] Uid: user's login Gid: user's login group Class: user's general classification Change: password change time Expire: account expiration time Full Name: user's real name (*) Home Directory: user's home directory Shell: user's login shell NOTE(*) - Historically, the so-call "GECOS" field in the user database entry contain the full name plus other information. Only the full name is currently supported. The login field is the user name used to access the computer account. The password field contains the encrypted form of the user's password. Do not use this to change a password; use passwd(1) instead. The uid field is the number associated with the login field. Both of these fields should be unique across the system (and often across a group of systems) as they control file access. While it is possible to have multiple entries with identical login names and/or identical user id's, it is usually a mistake to do so. Rou- tines that manipulate these files will often return only one of the multiple entries, and that one by random selection. The group field is the group that the user will be placed in at login. Since BSD supports multiple groups (see groups(1)) this field cur- rently has little special meaning. This field may be filled in with either a number or a group name (see group(5)). The class field references class descriptions in /etc/login.conf and is typically used to initialize the user's system resource limits when they login. The change field is the date by which the password must be changed. The expire field is the date on which the account expires. Both the change and expire fields should be entered in the form ``month day year'' where month is the month name (the first three characters are sufficient), day is the day of the month, and year is the year. The full name field contains the full name of the user. The user's home directory is the full UNIX path name where the user will be placed at login. The shell field is the command interpreter the user prefers. If the shell field is empty, the Bourne shell, /bin/sh, is assumed. When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells. Once the information has been verified, chpass uses pwd_mkdb(8) to update the user database. LOOKUPD AND DIRECTORY SERVICE AWARENESS
User database entries (among other things) are under the control of lookupd(8) and may be physically located in many different places, including local and remote netinfo(5) databases, directory service agents such as LDAP servers and flat file databases such as master.passwd. This version of chpass is currently limited to changing user database entries in the flat file and local netinfo databases. ENVIRONMENT
The vi(1) editor will be used unless the environment variable EDITOR is set to an alternate editor. When the editor terminates, the informa- tion is re-read and used to update the user database itself. Only the user, or the super-user, may edit the information associated with the user. See pwd_mkdb(8) for an explanation of the impact of setting the PW_SCAN_BIG_IDS environment variable. FILES
/etc/master.passwd the user database /etc/passwd a Version 7 format password file /etc/chpass.XXXXXX temporary copy of the password file /etc/shells the list of approved shells SEE ALSO
finger(1), login(1), passwd(1), getusershell(3), login.conf(5), passwd(5), pwd_mkdb(8), vipw(8) and Robert Morris and Ken Thompson, UNIX Password security. BUGS
User information should (and eventually will) be stored elsewhere. HISTORY
The chpass utility appeared in 4.3BSD-Reno. BSD
December 30, 1993 BSD
All times are GMT -4. The time now is 05:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy