Enabling Remote Command Execution in Redhat Satellite

9i4b57pkTAs many of you know, a very useful feature of Redhat Satellite is the ability to execute remote commands on a set of servers. You pick a set of servers and plug in your command and schedule the job. Most of the time these remote commands run just fine, however they can error out if the server is not configured to allow remote command execution. Let’s discuss how to fix this.

If remote command execution is not allowed, you will probably see an error similar to those shown below,

Local permission not set for action type script.run

or

Invalid function call attempted

Note that these two error messages usually mean the same thing. You need to enable remote command execution on the remote server.

First off you need to make sure that the command rhn-actions-control is installed. If it is not then we first figure out which rpm provides the command. You can do so with the command below

# yum whatprovides */rhn-actions-control

Now that we know what to install, lets install it.

# yum -y install rhncfg-actions

Now we enable remote command execution

# rhn-actions-control –enable-all

Now you should be able to reschedule your job against the server via the webUI.

Related articles

Linux:How To Restart/Start/Stop Network Interface
‘Shell Shock’ command line vulnerability present in OS X, could be bigger than Heartbleed
Advertisements

Configuring Remote Syslog in ESXi 4.1 via the Linux RCLI

Groundhog

First thing you need to know about ESXi is that it rolls its log after a reboot, meaning if your ESXi server crashes there will be no logs to review and no way of knowing what when to hell and where.

For this reason it is imperative that you setup a remote syslog server and send your logs there. Vmware support will tell you this and shame you if you have not setup remote syslogging.

Fortunately the first hit on google for “ESX syslog how to” will take you directly to the VMware KB article. You can find it here. However this page does not contain directions on how to do this via the Linux rcli, it only contains directions on how to do this via the VMA (management appliance) and from Windows PowerCLI. Really Vmware?

Follow the directions below if you run a real operating system and are not a Windows Admin.

First configure your remote ESXi host to forward syslog to your syslog server.

esxcfg-syslog –server esx04 –setserver vsyslog02 –setport 514

Then verify your settings

esxcfg-syslog –server esx04 –show

Output will appear as follows if everything worked right.

Current remote syslog server settings:
Server name : (vsyslog02)
Server port : 514

Favorite Commands on Least Favorite Os

Aixlogo3dHey, take a look at the ugly AIX image that I just stole. Since I ran into the image thought that I would take a bit of time to get my AIX notes together and put my new image to good use.

Here are some of my favorite commands and other info.

prtconf

Shows system config

prtconf
System Model: IBM,9113-550
Machine Serial Number: blahblah
Processor Type: PowerPC_POWER5
Number Of Processors: 4
Processor Clock Speed: 1656 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 1 hostname
Memory Size: 15808 MB
Good Memory Size: 15808 MB
Platform Firmware level: SF230_143
Firmware Version: IBM,SF230_143
Console Login: enable
Auto Restart: true
Full Core: false

ipcs -mob

Shows shared memory config

IPC status from /dev/mem as of Fri Dec 28 10:52:23 EST 2007
T        ID     KEY        MODE       OWNER    GROUP NATTCH     SEGSZ
Shared Memory:
m   4194304 0xffffffff --rw-rw----     root   system      1      4096
m   6291457 0xffffffff --rw-rw----     root   system      1      4096
m   6291458 0xffffffff --rw-rw----     root   system      1      4096
m   9437187 0xdd9369d4 --rw-r-----  dbpcomf      dba     47 1090523136
m  6291460 0xf6e89580 --rw-r-----   dbpisv      dba    104 8640286720v

Memory and Paging

lsattr  -E  -l  sys0  |  grep  realmem

To determine how much physical memory resides on the hardware, use the
AIX following command to determine the amount of physical memory:

lsps –a
To determine how much paging space is
installed; use the command above.
To increase Paging Space; use the following AIX path in SMIT (System
Management Interface Tool)
Physical and Logical Storage -> Paging Space -> Change/Show
Characteristics of Paging Space
Do not add a new paging logical volume. Add specified PP’s (as needed)
to the existing paging logical volume. Select logical volume and press
return. Type 1 for the Number of additional logical partitions.

Networking

netstat -v | grep Speed

Show NIC speed

Collect System Dump on an AIX System

  • Verify dump size by typing sysdumpdev –L at the command line.
  • Find a repository large enough for the dump.
  • Type snap –r at the command line to remove any previous dumps.
  • Type snap  -gfkDGL at the command line to create the new dump.
  • Type snap –c to compress into the pax file.

Intro to SMIT/SMITTY

  • System Management Interface Tool
  • smit will run GUI version if $DISPLAY is set, text version otherwise
  • Use smitty to force use of text version
  • Important keystrokes (If you don’t have function keys, use ESC+n for Fn):

Function Keys

F3 > Cancel (go back to previous screen)

F4 > List options for a given field

F6 > Show command that SMIT is executing

F7 > Tag item from list (e.g., when selecting software to install)

F10 > Exit SMIT

Useful files:

smit.log >Logs what you’ve done (menu selections, command output, etc)

smit.script > listing of all commands SMIT has executed for you (same as shown by F6)

Command prefix naming conventions:

o ch (change)

o ls (list)

o mk or cr (make or create)

o rm (remove)

Sun 5220 Console and ILOM How To

solaris_logo

As far as I know this documentation is specific to Sun T5150s and Sun T5250s. However some of the information below may also pertain to other Sun systems running ILOM.

ILOM Commands

To power on the host, type:

start /SYS

To power off the host, type:

stop /SYS

To reset the host, type:

reset /SYS

How to set the system not to auto boot the OS

Example:

-> set /HOST/bootmode script=”setenv auto-boot? false”

Press Enter and then type:

-> reset /SYS

Accessing the Console from ILOM

start /SP/console

Configuring a Static IP Address Using CLI and Ethernet

Log in to the ILOM using Secure Shell (SSH) over the network, or
by connecting a terminal to the serial port. To establish a Secure Shell (SSH)
connection to the CLI, type the appropriate connection command in the
SSH application. For example, to connect to the ILOM with an IP address
of 129.144.82.20, type the following command:

# ssh -l root 129.144.82.20

Type the following command to set the working directory.

cd /SP/network

Type the following commands to specify a static Ethernet
configuration.

Note – The following values are samples only. You must specify the IP
address, netmask, and gateway appropriate for your ILOM and network
configuration.

set pendingipaddress=129.144.82.26
set pendingipnetmask=255.255.255.0
set pendingipgateway=129.144.82.254
set pendingipdiscovery=static
set commitpending=true