Help with credentials when using Grep across multiple servers
Hello all,
I need some help with a script I have been working on. I was wanting to know if it is possible to add authentication to it for each server it runs across? The credentials are all the same on each server.
This is what I am using so far and it seems to work. I am trying to avoid typing my password each time it trys to grep each server. Not a big deal either way but it would be nice.
Hi folks. I am writing a ksh ftp script. The problem is, I need to transfer the files to several different servers. Is there a way to close a connection and move on to the next in one script or do I need to write a separate script for each one?
Thanks,
kristy (2 Replies)
good day. i jsut wanted to know what is the best script or the best way changing a lot of Ip's in all servers. Do you have any idea? im using awk to change IP,what if, you have lots of servers. You need to change it one by one? It will take time to change it manually. (2 Replies)
Hi guys , i have 1 problem and no find what is the problem...:confused:, and .netrc is configured and correct permissions...
REMOTE="/home/user"
LISTADO=`cat /root/home/user/LISTADO.txt`
MACHINE=$(echo $i|awk 'FS="|" {print $1}')
for i in $LISTADO
do
ftp $MACHINE <<TER
passive
prompt... (2 Replies)
Hi All,
I need help , Regarding the keyword search in multiple servers at a time . we are desiging a search website . we have a multiple servers and each of the server have 3 instances having Unix compressed files.Our requirement was we need to search the particular key word for eg. we need to... (7 Replies)
Hi,
I need to grep(look) for a line in filename named /tmp/Test on all 90 unix servers. Without logging to each servers manually and grep'ing for the line, is there a way to pull this info in output file thru' the ksh/sh/bash script. Can someone pl. help to create this script for me?
Ex.... (3 Replies)
Suppose i have 3 different servers say x,y and z.
Im running some process say ABC and 40 instances for the same is being created.
In load sharing suppose on
server x, 20 instances are running
server y, 10 instances are running
server z, 10 instances are running.
While checking the... (1 Reply)
Hi,
I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command.
Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns.
Xargs -I {} grep... (3 Replies)
Hi folks.
I'm pretty new to unix, while I'm learning a lot I'm finding bash scripting quite confusing. Im sure it's not really, my head just hasn't clicked with it.
Anyway, I need a script to loop the ip addresses stored in a file and run a "pgrep <process>" and return the pid or some... (2 Replies)
Hi ,
Can any please help the below requirement on all multiple servers and multiple dbs.
update configuration set value='yes' ;1)
the above statement apply on 31 Databases at a time on different Ip address
eg : 10.104.1.12 (unix ip address )
the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
LEARN ABOUT SUNOS
pam_setcred
pam_setcred(3PAM) PAM Library Functions pam_setcred(3PAM)NAME
pam_setcred - modify/delete user credentials for an authentication service
SYNOPSIS
cc [ flag ... ] file ... -lpam [ library ... ]
#include <security/pam_appl.h>
int pam_setcred(pam_handle_t *pamh, int flags);
DESCRIPTION
The pam_setcred() function is used to establish, modify, or delete user credentials. It is typically called after the user has been authen-
ticated and after a session has been opened. See pam_authenticate(3PAM), pam_acct_mgmt(3PAM), and pam_open_session(3PAM).
The user is specified by a prior call to pam_start() or pam_set_item(), and is referenced by the authentication handle, pamh. The following
flags may be set in the flags field. Note that the first four flags are mutually exclusive:
PAM_ESTABLISH_CRED Set user credentials for an authentication service.
PAM_DELETE_CRED Delete user credentials associated with an authentication service.
PAM_REINITIALIZE_CRED Reinitialize user credentials.
PAM_REFRESH_CRED Extend lifetime of user credentials.
PAM_SILENT Authentication service should not generate any messages.
If no flag is set, PAM_ESTABLISH_CRED is used as the default.
RETURN VALUES
Upon success, pam_setcred() returns PAM_SUCCESS. In addition to the error return values described in pam(3PAM) the following values may be
returned upon error:
PAM_CRED_UNAVAIL Underlying authentication service can not retrieve user credentials unavailable.
PAM_CRED_EXPIRED User credentials expired.
PAM_USER_UNKNOWN User unknown to underlying authentication service.
PAM_CRED_ERR Failure setting user credentials.
ATTRIBUTES
See attributes(5) for description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability | Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe with exceptions |
+-----------------------------+-----------------------------+
SEE ALSO pam(3PAM), pam_acct_mgmt(3PAM), pam_authenticate(3PAM), pam_open_session(3PAM), pam_set_item(3PAM), pam_start(3PAM), libpam(3LIB),
attributes(5)NOTES
The interfaces in libpam are MT-Safe only if each thread within the multithreaded application uses its own PAM handle.
SunOS 5.10 13 Oct 1998 pam_setcred(3PAM)