10 More Discussions You Might Find Interesting
1. Solaris
iam withdrawing this thread , It was my mistake I didn't read the code properly (0 Replies)
Discussion started by: boncuk
0 Replies
2. Shell Programming and Scripting
I am trying to execute expect command inside by small bash script to login into servers using key authentication method. My script is as follows:
#!/bin/bash
HOST=$1
/usr/bin/expect -c "
spawn ssh -i /root/.ssh/id_rsa root@$HOST
expect -exact "Enter... (3 Replies)
Discussion started by: John Wilson
3 Replies
3. Shell Programming and Scripting
Hi All,
I run the scp command in shell prompt without issue, but when on expect script as below:
#!/usr/bin/expect
spawn scp /var/spool/sms/failed.tar.gz abc@10.10.12.2:/home/abc
expect "abc@10.10.12.2's password: "
send "abcfef\r"
exit 0
It looks not working at all and the... (3 Replies)
Discussion started by: elingtey
3 Replies
4. Shell Programming and Scripting
Hi All,
I am testing expect script in command prompt without issue, but in crontab it is not working, i check the output error as below:
#cat /var/log/testexp.log
spawn minicom -C /var/log/minicom1.log
No cursor motion capability (cm)
AT+COPS=?
I am new in scripting, together... (1 Reply)
Discussion started by: elingtey
1 Replies
5. Shell Programming and Scripting
The big problem is that exp_internal isnt working... which makes it difficult to determine whats happening with the if statement.
1. why isnt exp_internal not working ?
2. Is there a better way to do the check of a file ?
Im trying to find a "tighter" way to check that a file exists and has... (0 Replies)
Discussion started by: popeye
0 Replies
6. Shell Programming and Scripting
I have the following expect script sitting on a Linux box.
===
#!/usr/bin/expect -f
#
# backup.expect
#
# Expect script to backup a firewall via a SSH session
#
#
set firewall
set username
set password
set prompt
set filename
match_max 50000
spawn ssh -l... (2 Replies)
Discussion started by: alagondar
2 Replies
7. Shell Programming and Scripting
Hi,
Please share you experience and way out on below error:-->
#!/bin/bash -xv
FILE=login.txt
+ FILE=login.txt
CONNECT=sshlogin.exp
+ CONNECT=sshlogin.exp
SERVERNAME=$1
+ SERVERNAME=192.168.12.1
MyServer=""
+ MyServer=
MyUser=""
+ MyUser=
MyPassword=""
+ MyPassword=
exec 3<&0
+... (6 Replies)
Discussion started by: manish_1678
6 Replies
8. Programming
All,
Ok...so I know I *should* be able to control a process's stdin and stdout from the parent by creating pipes and then dup'ing them in the child. And, this works with all "normal" programs that I've tried. Unfortunately, I want to intercept the stdin/out of the scp application and it seems... (9 Replies)
Discussion started by: DreamWarrior
9 Replies
9. Shell Programming and Scripting
I am having an issue with TCL\Expect; I am passing arguments via the commandline that are read in via "lrange $argv". One of those var's is a password with characters that need to be escapaed, after escaping them an hitting enter expect is placing curly braces around my password... why?!
... (4 Replies)
Discussion started by: RiSk
4 Replies
10. Shell Programming and Scripting
Im trying to write a script that will change user to cyrus then reconstruct mailbox for the user defined in the parsed argument. If i was loggin in to terminal to do this manually for wendys mailbox i would do this
sudo su cyrus
/usr/bin/cyrus/bin/reconstruct -r user/wendy
That would... (4 Replies)
Discussion started by: timgolding
4 Replies
NWAUTH(1) nwauth NWAUTH(1)
NAME
nwauth - Verify username/password
SYNOPSIS
nwauth [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -D ]
DESCRIPTION
nwauth does nothing but logging into a NetWare server. If the login was successful, an error code of 0 is returned. If the login was not
successful, an error code of 1 is returned. It was designed for use by other programs who want authenticate users via a NetWare server.
If there is no -P or -n option specified on command line, nwauth always expects a password on stdin. If the stdin is a tty, then the user
is prompted for a password. Otherwise nwauth simply reads stdin for a password.
nwauth looks up the file $HOME/.nwclient to find a file server and a user name if they are not specified on command line. See nwclient(5)
for more information. Please note that the access permissions of .nwclient MUST be 600, for security reasons.
OPTIONS
-h
-h is used to print a short help text.
-S server
server is the name of the server you want to use.
-U user name
If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your
NetWare user name.
-D
nwauth says that your password is correct if you have existing connection to server with name user name. This is handy for some shell
scripts, but it is unacceptable for authorization modules, such as PAM, PHP or Apache. It was pointed to me that this behavior was not
well known, and there exist at least one PAM module which does not know that (this module is not part of ncpfs; you should use PAM mod-
ule which comes with ncpfs instead anyway).
SEE ALSO
nwclient(5)
CREDITS
nwauth was written by Volker Lendecke (lendecke@math.uni-goettingen.de)
nwauth 10/27/1996 NWAUTH(1)