Thanks for the reply. Sorry i should have been more specific.
This is an expect script which internally calls another expect script to reset password on multiple servers by passing userid , oldpass , server name and newpassword.
Below is the passwd_reset which gets called from the previous script
Moderator's Comments:
Please use code (NOT icode!) tags as required by forum rules!
Last edited by RudiC; 07-26-2016 at 08:41 AM..
Reason: Changed ICODE tags
Hello!
I'm having problems trying to extract the contents of a variable and placing it into a text file. Grateful for any help.
Been trying something along the lines of:
$variable > file.txt
or
`cat < $variable` > file.txt
As you can see I'm a newbie to this :D (2 Replies)
Hi. I'm a newbie in scripting and i have this problem: i want to use the 'fuser' command on a file to tell if it's being accessed (for my purposes: still being written). I want to save the output of the command and later compare with the 'not being used' result.
the script:
#!/bin/bash... (2 Replies)
Hi There,
I try to transfer a variable from the script to a function which use expect, but I don't succed.
#!/bin/sh
HPPASS1="$2"
send_command()
{
echo "spawn ssh login@10.10.10.10"
echo 'set password '
echo 'sleep 1'
echo 'expect "*assword:*"'... (5 Replies)
Please tell me how to pass variable "a b c" to expect from the shell script
1/ example of input file
# cat in-file
var1 var2 a b c var4
2/ # this is my script - how to pass "a b c" as single variable ?
cat in-file | while read x
do
my-expect x
done
3/ # expect script - how to... (0 Replies)
Hi all,
I would like to store the output of a command in a variable and output it to the console at the same time. This is working fine using the following construct
var=`command | tee /dev/tty`
I use this in some scripts to display the output of the command on the console and, at the same... (2 Replies)
As part of an expect script, I have to convert a strange user ID to a conventional UNIX ID. To do this, I read the contents of a file and do a little awk magic. Here's that bit of the expect script:
send "awk 'NF == 10 && \$NF == strange_user_id {print \$(NF-2)}' file_with_my_info\r"
expect... (0 Replies)
The situation is like this:
I am reading records from a file, depending upon some condition extracting fields from the file into different variables in a loop one by one. I need to print all the variable in line, so I am trying to redirect hose variables one by one to a variable called final_value... (1 Reply)
Hi everybody,
I am trying to do the thing you see in the title, and I can't simply do
a=$(svn up)
echo $a
because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips?
Thanks,... (2 Replies)
when i do something like this:
bona=$(echo hi2 > /dev/pts/1 ; printf '%s\n' "" | sed '/^$/d')
i get:
hi2
and the $bona variable is empty, when I run:
echo ${bona}
i get the result "hi2" outside of the variable. I want it stored in the bona variable with nothing outputted to the... (6 Replies)
Discussion started by: SkySmart
6 Replies
LEARN ABOUT CENTOS
sasl_setpass
sasl_setpass(3) SASL man pages sasl_setpass(3)NAME
sasl_setpass - Check a plaintext password
SYNOPSIS
#include <sasl/sasl.h>
int sasl_setpass(sasl_conn_t *conn,
const char *user,
const char *pass, unsigned passlen,
const char *oldpass, unsigned oldpasslen,
unsigned flags)
DESCRIPTION
sasl_setpass will set passwords in the sasldb, and trigger the setpass callbacks for all available mechanisms.
user is the username to set the password for.
pass and passlen are the password to set and its length
oldpass and oldpasslen are the old password & its length (and are optional)
flags Are flags including SASL_SET_CREATE and SASL_SET_DISABLE (to cause the creating of nonexistent accounts and the disabling of an
account, respectively)
NOTES
oldpass and oldpasslen are unused in the Cyrus SASL implementation, though are passed on to any mechanisms that may require them.
RETURN VALUE
Returns SASL_OK on success. SASL error code on failure.
CONFORMING TO
RFC 4422
SEE ALSO sasl(3), sasl_errors(3), sasl_checkpass(3)SASL 10 July 2001 sasl_setpass(3)