I recently started using Progress OpenEdge and am confused about the purpose of the -char parameter to the sqlexp (SQL Explorer) command from Progress's command line utility, Proenv.
I have looked at the documentation here, but apparently Progress didn't feel that parameter should be documented. I've also looked in the Progress Knowledge Base but can't find an actual definition for the -char parameter.
For example, I see no difference between the commands sqlexp -char -db C:\pathtomydb\mydb.db -H 127.0.0.1 -S 2500 -user jmoor -password *** and sqlexp -db C:\pathtomydb\mydb.db -H 127.0.0.1 -S 2500 -user jmoor -password ***
Both commands seems to do the exact same thing. Even if I run an actual SQL command such as SELECT * FROM PUB.CUSTOMER WHERE "Cust-id" = 15; using the -command parameter, the -char parameter seems to make no difference.
It is obsolete since 10.1A, see https://knowledgebase.progress.com/articles/Article/P92359
Help says the following but I can't see any way to configure it. I checked sqlexp.bat and it is not using GUI class in any manner. Looks like it is an overlook. You can ignore it.
Usage: sqlexp [-modeoptions] [-connectoptions] [-generaloptions]
where mode options include:
-char Optional argument. Default is GUI mode.
Related
I am unable to apply changes using ldapmodify for the first time after installing openldap on my rhel7 server.
I have installed openldap from the scratch. Now i want to modify the olcDatabase={2}hdb.ldif to put my own olcSuffix,olcRootDN and olcRootPW.
I have generated the encrypted password with ldappasswd and put that along with other two parameters to .ldif file.
Now when, i try to apply these changes to my ldap setup using following command
ldapmodify -Y EXTERNAL -H ldapi:/// -f db.ldif
i get the error as
ldap_sasl_interactive_bind_s: Local error (-2)
further if i wish to use -D to bind with the default user -D "cn=Manager,dc=my-domain,dc=com" it needs a password. i do not know what username password combination i should use to run my first ever ldapmodify on this newly installed openldap.
Your help is much appreciated.
Best regards,
Amit Joshi
You're hitting an OpenLDAP bug (see ITS#8998).
The solution is to either
unset option SASL_NOCANON in ldap.conf or
specify the full path in the LDAPI URI (with URL-quoting of slashes).
The first option might be easier but might affect binding with SASL/GSSAPI (Kerberos).
Trying to run this piece of code, but a "Prompt is not set" error keeps occurring at the Execute Command line.
*** Settings ***
Library Telnet
Library Telnet ${out}
Library Collections
Library Collections ${y}
Library Collections ${x}
*** Variables ***
${ip} 0.0.0.0
${port} 0
*** Test Cases ***
telnet to server
Open Connection ${ip} ${port}
verify something
${out}= Execute Command ls
${y}= Get From List ${out} 0
Should Match Regexp ${y} /^ID$/
Exit Test
Close All Connections
I have also tried deleting "Library Telnet ${out}" and replacing the " ${out}=
Execute Command ls" line with the following, but receive the same error.
Write ls
Set Prompt ${out}
${out}= Read Until Prompt
Is there a problem with the syntax? Or, is the usage of the "prompt" completely wrong? (if so, how can i fix this?)
(note: this is a first attempt at robot framework, so please feel free to comment on any other problems!)
Everything is in the Telnet docs. I use RED Robot Editor which can show me docs for Telnet and Telnet KW by hover over Telnet entry in editor, this can also be generated via command line:
python -m robot.libdoc Telnet show
There is a part about Prompt:
== Prompt ==
Often the easiest way to read the output of a command is reading all
the output until the next prompt with `Read Until Prompt`. It also makes
it easier, and faster, to verify did `Login` succeed.
Prompt can be specified either as a normal string or a regular expression.
The latter is especially useful if the prompt changes as a result of
the executed commands. Prompt can be set to be a regular expression
by giving ``prompt_is_regexp`` argument a true value (see `Boolean
arguments`).
Examples:
| `Open Connection` | lolcathost | prompt=$ |
| `Set Prompt` | (> |# ) | prompt_is_regexp=true |
Check Telnet docs for more help and examples.
ps. I don't see reason to import Telnet with parameter:
Library Telnet ${out}
Although I am too late to answer, I did not see the exact expected answer hence answering this now.
You need to set 2 things in Open Connection.
prompt_is_regexp=yes
prompt=#{Your expected prompt}
I read on man sshd one can add post-login processing when a user logs in using a particular key:
environment="FOO=BAR" ssh-rsa AAA... keytag
But when I try to ssh into the system, the target host does not register the line and instead asks for a password. What is the right way of adding this? I would like to do something like
command="echo|mail -s ${USER},${HOSTNAME} a.monitored.email#example.com" ssh-rsa AAA... keytag
I am using Suse SLE 11 SP2.
Thanks
Dinesh
First, according to the documentation command = "command":
That specifies the command is executed Whenever This key is used for authentication. The command supplied by the user (if any) is ignored. The command is run on a pty if the client requests a pty; Otherwise it is run without a tty. If an 8-bit clean channel is required, one must not request a pty or specify no-pty Should. A quote May be included in the command by quoting it with a backslash. This option might be useful to restrict Un certain public keys to perform just a specific operation. An example might be a key That Permits remote backups but nothing else. Note That May specify the client TCP and / or X11 forwarding Explicitly UNLESS they 'are prohibited. The command originally supplied by the client is available in the SSH_ORIGINAL_COMMAND environment variable. Note That This option Applies to shell, command or subsystem execution. Also note This command That May be superseded by Either a sshd_config (5) ForceCommand directive or a command embedded in a certificate.
Using this option, it is possible to enforce execution of a given command when this key is used for authentication and no other.This is not what you're looking for.
To run a command after login you can add in the file ~/bashrc something like this:
if [[ -n $SSH_CONNECTION ]] ; then
echo|mail -s ${USER},${HOSTNAME} a.monitored.email#example.com"
fi
Second, you need to verify the permissions of the authorized_keys file and the folder / parent folders in which it is located.
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
For more information see: https://www.complang.tuwien.ac.at/doc/openssh-server/faq.html#3.14
I found this call in an app I started managing some time ago:
/usr/bin/sftp -b - -o Port=22 abc12#90.00.00.44
Whats suspicious is -b - -o ... isnt it? I think the param is missing here...
Thanks
I don't believe there's anything suspicious about it.
The -b - is simply reading the script from standard input which we can't tell from your sample where it's coming from. It may be redirected or it may just interact with the user. The - file name is quite prevalent at meaning standard input. Try cat - under Linux for example.
The sftp manpage states this clearly:
A batchfile of '-' may be used to indicate standard input.
The -o Port=22 is simply setting the SSH option to use port 22 (which is usually the default anyway).
I have two unix machines, both running AIX 5.3
My $HOME is mounted on machine1.
Using NFS, login machine2 will go to the same $HOME
I login machine2 first, then machine1.
Both using telnet.
The 2 sessions will share the same .sh_history file.
I found out that the fc -l behavior very strange.
In machine2, I issue the commands in telnet:
fc -l
ksh fc -l
Both give the same output.
In machine1,
fc -l
ksh fc -l
give DIFFERENT results
The result for ksh fc -l
is the same as /usr/bin/fc -l
Also, when I run a script like this:
#!/usr/bin/ksh
fc -l
The result is same as /usr/bin/fc -l
Could anyone tell me what happened?
Alvin SIU
Ah, wisdom of the ancients... (Since this post is over a year old.)
Anyway, I just encountered this problem in Solaris 10. Issue seems to be this: When you define a function in /etc/profile, or in any file called by /etc/profile, your HISTFILE variable gets ignored by the Korn shell, and the shell instead uses ".sh_history" when accessing its history. Not sure why this is.
Result is that you see other root shell's commands. You can test it with :
lsof -p $$
or
cat /proc/$$/fd/63
It's possible that the login shell is not ksh or that $HISTFILE is being reset. One thing you can do is echo $HISTFILE in the various situations and see if it's different. Another thing to check is to see what shell you're in using ps.
Bash (default $HOME/.bash_history), for example, will have a different $HISTFILE than ksh (default $HOME/.sh_history).
Another possible reason for the difference is that the builtin fc may be able to see in-memory history that hasn't been written to disk yet (which the external /usr/bin/fc wouldn't be able to see). If this is true, it may be version dependent. Bash, for example, doesn't write history to the file until the shell exits. Ksh (at least the version I'm using) writes it immediately.