how to Remote Reset Password for User ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to Remote Reset Password for User ?
# 1  
Old 07-29-2010
how to Remote Reset Password for User ?

Hello, everyone i have a little scenario and would like help ,
SCENARIO
OS : SunOS 5.10
Shell: KSH
UserName 1 connects to Server1 .He should run a little command or somthing to server2 that Resets the password of user2.
i have tried this :
Code:
 ssh user@server2 '/usr/local/bin/sudo passwd user2'

it doesn't work because of the permission, the user that i try to connect to the remote server hase permission of ALL in the SUDOERS on the remote server so when i connect directly to the server and do SUDO it works, remotly it does not

pleazzzz

---------- Post updated at 06:23 AM ---------- Previous update was at 02:50 AM ----------

if there is any other way to remote adduser and resetpassword it will also ok
just in KSH is required

Last edited by shatztal; 07-29-2010 at 07:02 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Beginners Questions & Answers

Giving password reset access to non-root user, in LDAP

Hi, We have two LDAP servers. Whenever we get a ticket to reset the password, we login to LDAP primary server and reset the password. For below example, I logged into primary LDAP server and resetting password to john to Welcome123# We are giving this work to tier-1 team, so that they can reset... (1 Reply)
Discussion started by: ron323232
1 Replies

3. Red Hat

User password reset

Hello - I want to reset user password in multiple server via root ID. I have passwordless authentication for root between all the servers. I an use loop to reset the password. I am using below command in loop echo mypassword | passwd username --stdin However, if anyone sees history - he... (5 Replies)
Discussion started by: saurabh84g
5 Replies

4. UNIX for Dummies Questions & Answers

Need to reset password on remote host

I have access to a variety of hosts. I need to be able to reset my password on 400+ hosts every 80 days due to password expiration. I connect to these servers across the country using an ssh telnet terminal. I am a Security Administrator, but I don't manage the Unix machines on our network. Is... (1 Reply)
Discussion started by: XtremeRevolutio
1 Replies

5. UNIX for Dummies Questions & Answers

ssh to remote machine with 2nd user and password

Hi all, Really hope someone can help me, i have been trying lots of things and just cant seem to nail it - and for something that seems straight forward.... Anyway, scenario is I need to log onto a second machine (remote server) from main workstation. Once logged in I need to run a batch... (2 Replies)
Discussion started by: Hopper_no1
2 Replies

6. Solaris

how to Remote Reset Password for User ?

Hello, everyone i have a little scenario and would like help , SCENARIO OS : SunOS 5.10 Shell: KSH UserName 1 connects to Server1 .He should run a little command or somthing to server2 that Resets the password of user2. i have tried this : ssh user@server2 '/usr/local/bin/sudo passwd... (2 Replies)
Discussion started by: shatztal
2 Replies

7. Shell Programming and Scripting

[SSH] Need to connect to remote server as different user and without password

I have a task requiring that USER_A run a script, which connects to HOST_B as USER_B and does not ask for a password. If I am logged in on HOST_A as USER_B, I can connect to HOST_B without a password, no problem. However, if I try running ssh with the command line "ssh USER_B@HOST_B" while... (3 Replies)
Discussion started by: Totengraber
3 Replies

8. Solaris

LDAP user password reset script

Hey all, I'm looking for a script to auto-generate a password for users that forget their password. Currently, we are using a perl script (with cgi-bin) where users update their password, but would like to add to this and make it so that the users can also request a password reset and a... (1 Reply)
Discussion started by: em23
1 Replies

9. Solaris

unable to reset user password

hi, i am unable to reset one of my server user password. whenever i make a "passwd username" i get the following error ======================================== New Password: Re-enter new Password: Permission denied ======================================== please advise.thanks... (6 Replies)
Discussion started by: cromohawk
6 Replies

10. Shell Programming and Scripting

Is it possible to write a script to reset user's password?

Is there anyway that I can reset user's password using a script/ssh command? ie. emulate passwd command with a default password of abc123 or even null value? > ssh server1 pwdadm user1 < /dev/null or > ssh server1 passwd user1 < /dev/null neither worked for me.. but you know what I... (1 Reply)
Discussion started by: pdtak
1 Replies
Login or Register to Ask a Question
PDO_SQLSRV-DSN(3)							 1							 PDO_SQLSRV-DSN(3)

PDO_SQLSRV DSN - Connecting to MS SQL Server and SQL Azure databases

	The PDO_SQLSRV Data Source Name (DSN) is composed of the following elements:

	      o DSN prefix
		- The DSN prefix is sqlsrv:.

	      o APP - The application name used in tracing.

	      o ConnectionPooling - Specifies whether the connection is assigned from a connection pool (1 or TRUE) or not (0 or FALSE).

	      o Database - The name of the database.

	      o Encrypt - Specifies whether the communication with SQL Server is encrypted (1 or TRUE) or unencrypted (0 or FALSE).

	      o Failover_Partner  - Specifies the server and instance of the database's mirror (if enabled and configured) to use when the primary
		server is unavailable.

	      o LoginTimeout - Specifies the number of seconds to wait before failing the connection attempt.

	      o MultipleActiveResultSets - Disables or explicitly enables support for multiple active Result sets (MARS).

	      o QuotedId - Specifies whether to use SQL-92 rules for quoted identifiers (1 or TRUE) or to use  legacy  Transact-SQL  rules  (0	or
		false).

	      o Server - The name of the database server.

	      o TraceFile - Specifies the path for the file used for trace data.

	      o TraceOn - Specifies whether ODBC tracing is enabled (1 or TRUE) or disabled (0 or FALSE) for the connection being established.

	      o TransactionIsolation   -  Specifies  the  transaction  isolation  level.  The  accepted  values  for  this  option  are  PDO::SQL-
		SRV_TXN_READ_UNCOMMITTED, PDO::SQLSRV_TXN_READ_COMMITTED, PDO::SQLSRV_TXN_REPEATABLE_READ, PDO::SQLSRV_TXN_SNAPSHOT, and PDO::SQL-
		SRV_TXN_SERIALIZABLE.

	      o TrustServerCertificate	-  Specifies  whether the client should trust (1 or TRUE) or reject (0 or FALSE) a self-signed server cer-
		tificate.

	      o WSID - Specifies the name of the computer for tracing.

       Example #1

	      PDO_SQLSRV DSN examples

	       The following example shows how to connecto to a specified MS SQL Server database:

	      $c = new PDO("sqlsrv:Server=localhost;Database=testdb", "UserName", "Password");

	       The following example shows how to connect to a MS SQL Server database on a specified port:

	      $c = new PDO("sqlsrv:Server=localhost,1521;Database=testdb", "UserName", "Password");

	       The following example shows how to connecto to a SQL Azure database with server ID 12345abcde. Note that when you  connect  to  SQL
	      Azure with PDO, your username will be UserName@12345abcde (UserName@ServerId).

	      $c = new PDO("sqlsrv:Server=12345abcde.database.windows.net;Database=testdb", "UserName@12345abcde", "Password");

PHP Documentation Group 													 PDO_SQLSRV-DSN(3)