06-27-2017
I need it done without the ssh keys. I have the ssh keys in place. However this script will be use by an HA software that will call under root and it must su to that id so it can run the commands. The ssh keys in this case do not work. I must pass it the password of my id within the command. How do I do that? Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
First i want to tell you i am not a administrator and everytime to run a sqlscritpt i have to login as SU in a particular account to connect to sqlplus..
I want to write a script which can make me free by doin this .. since i am having the permission for SU i want to know if i can SUDO... (7 Replies)
Discussion started by: myelvis
7 Replies
2. Shell Programming and Scripting
hi all,
This is a very basic question. I want to make the command work at all times.
i'm working on Suse-Linux and "clear" command is used to clear the contents of screen. I want to use only "cls" instead of "clear" command.
i tried alias cls=clear , but its working only for a temporary... (3 Replies)
Discussion started by: wxwidgets
3 Replies
3. UNIX for Dummies Questions & Answers
How to get the current working directory as part of the command prompt? Every time I chage the folder, my command prompt path shoud change. I am using Korn Shell. Any help is greatly appreciated. (3 Replies)
Discussion started by: MeganP
3 Replies
4. UNIX for Advanced & Expert Users
Hello. I searched the internet for answers and don't seem to find any for about a day now.
My problem. I want to su to a non-root account non-interactively, e.g. if I want to temporarily become prdusr, I want to su prdusr without keying prdusr's password every time.
What I want is... (10 Replies)
Discussion started by: royale-sojin
10 Replies
5. AIX
When I use "/" to look for a particular command that I typed in the current session it says
D02:-/home/user1/temp> /job
ksh: /job: not found.
D02:-/home/user1/temp>
previously it used to fetch all the commands which had job in it..
for example subjob, endjob, joblist etc...
may I... (7 Replies)
Discussion started by: meetzap
7 Replies
6. Shell Programming and Scripting
I have used this color prompt on my servers for long time, in file ~\.bashrc
Black="\"
Dark="\"
Blue="\"
LBlue="\"
Green="\"
LGreen="\"
Cyan="\"
LCyan="\"
Red="\"
LRed="\"
Purple="\"
LPurple="\"
Brown="\"
Yellow="\"
LGray="\"
White="\"
Reset="\"
PS1="$Yellow\u@\h $LBlue\w... (4 Replies)
Discussion started by: Jotne
4 Replies
7. Solaris
Hi All,
I am not able to get the command prompt after entering the login password on solaris server
Only access is through console.
Server type : sun4u sparc SUNW,Netra-T12
bsnl-north-in > ssh 10.147.17.207 jtoin
Connecting to 10.147.17.207 as user jtoin
Password:
Last login: Wed Mar 5... (1 Reply)
Discussion started by: sandeep_kmehra
1 Replies
8. Red Hat
Hi,
I'm trying to customize the ksh prompt for users on a RHEL 6.6 system for having user@host pwd : $ and user@host pwd # in red color for root.
I think it's possible but i do not even succeded for a non root user :
I added in my ~/.kshrc :
PS1="Hello : " and it works
but when i... (4 Replies)
Discussion started by: Fundix
4 Replies
9. AIX
in the /etc/sudoer file this line was added:
wtolentino ALL=(ORACLE) NOPASSWD: /bin/chmod
when i tried to run this command
sudo -u oracle /bin/chmod 775 /appshared/applications/lpa/executables/chrpt001.rep
it prompts me for a password
for example:
$ pwd
/appshared/applications/lpa... (2 Replies)
Discussion started by: wtolentino
2 Replies
10. UNIX for Beginners Questions & Answers
So Yesterday I switched from Solus Linux to Fedora Linux 30, but I forgot to backup some of my dotfiles including kshrc. I am fairly new to Korn shell and do not know it well, but through memory I was able to at least get this. I did use code from several different source to recreate it. The only... (13 Replies)
Discussion started by: zoomer
13 Replies
UPSCMD(8) NUT Manual UPSCMD(8)
NAME
upscmd - UPS administration program for instant commands
SYNOPSIS
upscmd -h
upscmd -l ups
upscmd [-u username] [-p password] ups command
DESCRIPTION
upscmd allows you to invoke "instant commands" in your UPS hardware. Not all hardware supports this, so check the list with -l to see if
anything will work on your equipment.
On hardware that supports it, you can use this program to start and stop battery tests, invoke a front panel test (beep!), turn the load on
or off, and more.
OPTIONS
-h
Display the help message.
-l ups
Show the list of supported instant commands on that UPS. Some hardware may not support any of them.
-u username
Set the username for the connection to the server. This is optional, and you will be prompted for this when invoking a command if -u is
not used.
-p password
Set the password to authenticate to the server. This is also optional like -u, and you will be prompted for it if necessary.
ups
Connect to this UPS. The format is upsname[@hostname[:port]]. The default hostname is "localhost".
UNATTENDED MODE
If you run this program inside a shell script or similar to invoke a command, you will need to specify all of the information on the
command line. This means using -u and -p. Otherwise it will put up a prompt and your program will hang.
This is not necessary when displaying the list, as the username and password are not required for read-only mode.
DANGEROUS COMMANDS
Some drivers like apcsmart(8) have built-in paranoia for the dangerous commands like load.off. To make them actually turn off the load, you
will have to send the command twice within a short window. That is, you will have to send it once, then send it again after 3 seconds
elapse but before 15 seconds pass.
This paranoia is entirely defined within the driver. upsd and upscmd have no control over the timing.
DIAGNOSTICS
upscmd won't work unless you provide a valid username and password. If you get "access denied" errors, make sure that your upsd.users(5)
has an entry for you, and that the username you are using has permissions to SET variables.
BUGS
There is currently no way to tell the user when the driver requires confirmation to invoke a command such as load.off. Similarly, there is
not yet a way to tell the user if a command succeeds or fails.
This is on the list of things to fix in the future, so don't despair. It involves magic cookies.
SEE ALSO
upsd(8), upsrw(8)
INTERNET RESOURCES
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/21/2012 UPSCMD(8)