Sponsored Content
Full Discussion: username password in script
Top Forums Shell Programming and Scripting username password in script Post 302106860 by grial on Tuesday 13th of February 2007 04:07:16 AM
Old 02-13-2007
Quote:
Originally Posted by srikanthus2002
try this

Code:
(sleep 5; echo user_name; sleep 6; password; sleep 9; echo "do something"; 
sleep 8; echo "exit") | telnet server_name

Not valid for SSH. Instead, you could use digital certificates so that SSH doesn't ask you for a password.
 

10 More Discussions You Might Find Interesting

1. Solaris

i wanto hardcode password for a username to ssh to a server using script

Dear all i want to ssh to a server via running a shell script with a username and i want to hard code the password for that particular username can u help me please Thank u Naree (8 Replies)
Discussion started by: naree
8 Replies

2. UNIX for Dummies Questions & Answers

Shell program with username and password

Hi I am new to unix and I am trying to figure out how to write a shell script with a login name and password. I want to do something along the lines of if both are correct it echoes "you are logged in" and if the password is wrong it echoes "wrong password" and same with the login name. I've tried... (7 Replies)
Discussion started by: thedemonhunter
7 Replies

3. UNIX for Dummies Questions & Answers

How can i hide username/password

hi all, i run sqlplus command on unix(HP-UX) like "sqlplus username/password@serverA @deneme.sql" but when someone run "ps -ef | grep sqlplus", it can see my username and password :( How can i hide username and password. thanx. (1 Reply)
Discussion started by: temhem
1 Replies

4. Shell Programming and Scripting

Asking username and password in the middle of the Shell/perl script

Can any body help me to find out the logic I have a script chkcomponent.pl Which give some output Like component1 userid: u1 component2 userid: u2 component3 userid: u1 . . #The no of components are different in different times run Now I want this chkcomponent.pl script... (1 Reply)
Discussion started by: pareshpatra
1 Replies

5. Shell Programming and Scripting

Username and password

Hi I am new to using unix and am struggling with a script i am writing. What i am trying to do is get a user to enter a username, check the original file i created with username and pin to see if their is a corresponding entry. Next ask the user to enter the pin and see if this matches... (5 Replies)
Discussion started by: somersetdan
5 Replies

6. UNIX for Dummies Questions & Answers

How do you reset username/password

Picked up a 3b2 running System V. Works fine, but it requires a username and password. Is the username "root" or "sysadm"? How do I find out and how to I reset it or bypass it? Thanks. (2 Replies)
Discussion started by: TanRuNomad
2 Replies

7. Shell Programming and Scripting

Passing username and password to a script running inside "expect" script

Hi I'm trying to run a script " abc.sh" which triggers "use.sh" . abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script. Please find below the scripts: #abc.sh #!/usr/bin/expect -f exec /root/use.sh expect "*name*" send... (1 Reply)
Discussion started by: baddykam
1 Replies

8. UNIX for Dummies Questions & Answers

Script to log in SFTP server [with username, password]

Hi, everyone, I am trying to write a script to login automatically using username and password to an sftp server (the key authentication has been disabled so I cannot use that method). I tried to search online for a solution and found a way using "expect" but my boss does not want me to use... (4 Replies)
Discussion started by: warmboy610
4 Replies

9. Shell Programming and Scripting

How to send Two different password in Single script, having same username..?

Hi Team, i want to input two password for single node like pass1/pass2 one of the pass1 is working some node and pass2 is working for some nodes . For nodes having pass1 i have to run different script and for nodes having pass2 i have to run different script Sooo how can put two pass... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies

10. Shell Programming and Scripting

Passing Username & password through shell script to java code

Hi, I have a shell script (script.sh) in which we are calling java code which asks for Username: Password: for authentication purpose currently we are passing the credential manually and run the script. but I am trying echo -e "user_id\npassword" | script.sh but its not... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
sleep(3)						     Library Functions Manual							  sleep(3)

NAME
sleep - Suspends execution for an interval of time LIBRARY
Standard C Library (libc.a) Threads Library (libpthreads.a) SYNOPSIS
#include <unistd.h> unsigned int sleep ( unsigned int seconds ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: sleep(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the number of seconds to sleep. DESCRIPTION
The sleep() function suspends execution of a process for the interval specified by the seconds parameter. The suspension time may be longer than requested due to the scheduling of other activity by the system. In a multi-threaded environment, the sleep() function is redefined so that only the calling thread is suspended. RETURN VALUES
If the sleep() function returns because the requested time has elapsed, it returns 0 (zero). If the sleep() function returns because it caught a signal, the function returns the number of seconds remaining in the suspension. RELATED INFORMATION
Commands: wall(1), shutdown(8) sleep(1) Functions: sigaction(2), alarm(3), pause(3) Standards: standards(5) delim off sleep(3)
All times are GMT -4. The time now is 03:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy