Sponsored Content
Top Forums Shell Programming and Scripting Logging in with Username/Password on one line Post 302731659 by myoung88 on Thursday 15th of November 2012 01:16:01 PM
Old 11-15-2012
Logging in with Username/Password on one line

Hello,

I am currently working on a project that requires me to remote login into another UNIX system using different credentials. The problem is that progamatically I cannot simply feed the password into the UNIX system. Is there a way to feed the password within one command line statement.

I tried using the following, but there are no parameters for password for the rlogin statement.

rlogin servername -l username
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

redirecting password as username for rlogin

Is the following even possible ? by echo $3, I mean enter password when prompted for it. My main issue is that it would deal with a prompted password, which is passed from the command line like this: ./processing serverA user password I cannot not use expect here, I heard that was very... (1 Reply)
Discussion started by: seaten
1 Replies

2. Shell Programming and Scripting

username password in script

Can we write a script to telnet to a unix server from unix with the username and password hardcoded in the script?? something like ssh a@b -p password ??? (5 Replies)
Discussion started by: roshanjain2
5 Replies

3. Red Hat

Trouble logging in with username and password

I have a RHEL 5 server that I can log into with an LDAP account hosted on a server running Sun DSEE 6.3 with an ssh key pair but not with my username and password. When I try to login to the console I am given the "login incorrect" message as if I fat fingered my password. Other users with... (5 Replies)
Discussion started by: ilikecows
5 Replies

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

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

6. Shell Programming and Scripting

FTP command line username and password passing

Dear All, I am new to unix and I am trying to build a shell script which will connect to a different server by passing username and password from a file or command line but not manually... In short I dont want to connect to a diff server via ftp interactively. Any suggestion...looking... (8 Replies)
Discussion started by: Pratik4891
8 Replies

7. UNIX for Advanced & Expert Users

Login through SFTP using username and password

Hi All, I want to login to a server through SFTP by giving username and password, in an automated script. I know that this can be done through public key authentication, but my requirement is to login ONLY through username and password. I am using GNU/Linux server. Please advise me !!!... (4 Replies)
Discussion started by: sparks
4 Replies

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

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

10. OS X (Apple)

OSX verify username and password in one line

I'm writing a script that has the need to verify the current user's username and password. I'm not entirely sure how to do this. I've read some things on "dscl" but am not sure that's the correct route for me to go. The one condition i have is that i really need to have the verification happen... (4 Replies)
Discussion started by: TheDrizzle
4 Replies
RLOGIN(1)						    BSD General Commands Manual 						 RLOGIN(1)

NAME
rlogin -- remote login SYNOPSIS
rlogin [-468DEd] [-e char] [-i localname] [-l username] host DESCRIPTION
The rlogin utility starts a terminal session on a remote host host. The standard Berkeley rhosts authorization mechanism is used. The following options are available: -4 Use IPv4 addresses only. -6 Use IPv6 addresses only. -8 Allow an eight-bit input data path at all times; otherwise parity bits are stripped except when the remote side's stop and start char- acters are other than ^S/^Q. -D Set the TCP_NODELAY socket option which can improve interactive response at the expense of increased network load. -E Stop any character from being recognized as an escape character. When used with the -8 option, this provides a completely transparent connection. -d Turn on socket debugging (see setsockopt(2)) on the TCP sockets used for communication with the remote host. -e Allow user specification of the escape character, which is ``~'' by default. This specification may be as a literal character, or as an octal value in the form nn. -i Allow the caller to specify a different local name to be used for authentication. This option is restricted to processes with uid 0. -l Specify a different username for the remote login. If this option is not specified, your local username will be used. A line of the form ``<escape char>.'' disconnects from the remote host. Similarly, the line ``<escape char>^Z'' will suspend the rlogin ses- sion, and ``<escape char><delayed-suspend char>'' suspends the send portion of the rlogin session, but allows output from the remote system. By default, the tilde (``~'') character is the escape character, and normally control-Y (``^Y'') is the delayed-suspend character. All echoing takes place at the remote site, so that (except for delays) the rlogin is transparent. Flow control via ^S/^Q and flushing of input and output on interrupts are handled properly. ENVIRONMENT
The following environment variable is utilized by rlogin: TERM Determines the user's terminal type. FILES
/etc/hosts /etc/hosts.equiv $HOME/.rhosts SEE ALSO
login(1), rsh(1), telnet(1), setsockopt(2), ruserok(3), tty(4), hosts(5), hosts.equiv(5), rlogind(8), rshd(8) HISTORY
The rlogin command appeared in 4.2BSD. IPv6 support was added by WIDE/KAME project. BUGS
The rlogin utility will be replaced by telnet(1) in the near future. More of the environment should be propagated. BSD
September 26, 2003 BSD
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy