Tag Archives: AIX

RBAC and LDAP users (AD)

By Janpol

Hello everyone, I am having trouble with something, and I can’t find the right answer online. On our company, we are using LDAP Authentication with Active Directory (Windows 2008 Servers) to have a centralized management of AIX 7.1 users.

So far so good, but now, we want to implement RBAC on AIX so we can grant privileged access to certain users (like DBAs or Sysadmins) without using su or having everyone using the root account. The problem that I have, is that when I want to assing a role to a user on a server the chuser command fails, since it cannot find the user (it’s on AD, and not defined locally). I use the following command to assign the role:

Code:

chuser roles=test_role test_user


Is there a way for me to tell the chuser command to get the user information from AD? Or can I define manually the roles for each user? (maybe in the /etc/security/user.roles file?).

If that doesn’t work I’m going to try defining groups in AD with the same GID as local groups, and handling everything via the sudoers file, but I would like to hear from your experiences.

Best Regards,

Juan

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

List of AIX commands that can be run by ROOT user ONLY

By prvnrk

Hello,

I am testing sudo and I want to test it. Can anyone please let me know few commands (of course other than shutdown, reboot etc. as I can’t reboot the box) on AIX that can be run by ROOT only.

Thanks

———- Post updated at 07:43 PM ———- Previous update was at 07:38 PM ———-

Never I mind i prepared one-line script to which i assigned 700 permission and owner to root and It solved my purpose.

However I’m still interested to know few commands that can be run only by root. (In solaris, “format” command can be run only by root).

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Running script on remote server

By proactiveaditya

Hi All,

I need to run a ksh script on around 200 servers(consisting of AIX,LInux,HP-UX,Solaris). The script is there in the /tmp directory of all the servers. I want want to execute the script in background on the respective servers and then exit from there. I have written something like below:



for i in `cat Server_List`
do ssh -q $i “nohup ksh /tmp/script.ksh -E &”
done

But i want the for loop to execute the remote script and then exit and proceed to the next server in Server_List.

For this i wrote:



for i in `cat Server_List`;
do ssh -q $i < "ksh /tmp/script.ksh -E &; exit";
done

But i am getting errors like below:
bash: ksh /tmp/script.ksh -E &; exit: No such file or directory
bash: ksh /tmp/script.ksh -E &; exit: No such file or directory
…. …. ….. ….. …… ……

Can someone help me in creating a script that serves my objective.

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Backup: The lseek call failed

By m_raheelahmed

Hi,

We are facing issues while backing up our 1205 GB filesystem on LTO5 Tape. During backup the “backup: The lseek call failed.” messages were generated, I want to know why these messages were generating
AIX version is: 6100-08-00-0000

Code:

backup: The date of this level 0 backup is Mon Mar 11 14:57:59 GMT+05:00 2013.
backup: The date of the last level 0 backup is the epoch.
backup: Backing up /dev/rfslv04 (/backup2) to /dev/rmt0.
backup: 0511-251 The file system is still mounted; data may not be consistent.
Use the umount command to unmount the filesystem; then do the backup.
backup: Mapping regular files. This is Pass 1.
backup: Mapping directories. This is Pass 2.
backup: There are an estimated 1397889184 1k blocks.
backup: Backing up directories. This is Pass 3.
backup: The lseek call failed.
backup: Backing up regular files. This is Pass 4.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: The lseek call failed.
backup: There are 1264566843 1k blocks on 1 volumes.
backup: The tape is rewinding.
backup: The backup is complete.


…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

AIX VIOS IVM Ethernet problem

By KevB

File Type: txt
Hi All,

I have a p520 box running 3 LPARs, 1 x VIOS, 1 x AIX 6.1 and 1 x AIX 7.1 and no HMC, all configuration is performed via VIOS/IVM

Until recently the box did not have the AIX7.1 LPAR and everything was fine with the box.

We needed to use AIX 7.1 for a new project, so I created a new LPAR and configured it to share the non-VIOS resouces equally with the AIX6.1 LPAR. Everything seemed to go well and I was able to install AIX 7.1 successfully and start using that via PuTTy and FTP as required.

However, it seems that everytime we need to cold-boot the machine, the AIX7.1 LPAR looses visibility of the network. The VIOS and AIX6.1 LPARs remain fine with full network connectivity.

In my investigations so far I have found the following from the VIOS LPAR:

Code:


$ lsdev
name status description
L2cache0 Available L2 Cache
VMLibrary Defined Logical volume
VMrootvg Defined Volume group
cd0 Available SATA DVD-RAM Drive
en0 Defined Standard Ethernet Network Interface
en1 Stopped Standard Ethernet Network Interface
en2 Defined Standard Ethernet Network Interface
en3 Defined Standard Ethernet Network Interface
en4 Defined Standard Ethernet Network Interface
en5 Defined Standard Ethernet Network Interface
en6 Available Standard Ethernet Network Interface
en7 Defined Standard Ethernet Network Interface
ent0 Available Logical Host Ethernet Port (lp-hea)
ent1 Available Logical Host Ethernet Port (lp-hea)
ent2 Available Virtual I/O Ethernet Adapter (l-lan)
ent3 ...read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Script Checking LVM Mirror not Working

By fede_mont

Hi,

I need to know who can I create an script in order to check server mirror in AIX. I got this script

Code:

!/usr/bin/ksh
#
# Check if a VG is mirrored.
#
# lsattr -El -a strictness -a copies
# If copies=2 and scrictness=y, then VG is mirrored
#
# LVs are retrieved via 'lsvg -l |grep -v :|grep -v LPs|awk {'print $1'}
#
# Return codes:
#
# 0 VG is mirrored
# 1 Some LVs are not mirrored
# 2 All LVs in VG are not mirrored
# 3 No VG name(s) supplied
# 4 One or more invalid VG specified
# 5-? Other error found
#
if [ "$#" -eq "0" ] ; then
echo "Please specify one or more volume group names"
exit 3
fi
#
VGs=$@
for VG in $VGs ; do
RCforVG=0
if [ ! -e /dev/${VG} ] ; then
RCforVG=4
continue
fi
LVCount=0
MLVCount=0
for LV in getlvodm -L $VG | awk '{print $1}' ; do
LVCount=expr $LVCount + 1
Strict=lsattr -El $LV -a strictness|awk '{print $2}'
Copies=lsattr -El $LV -a copies|awk '{print $2}'
if [ "$Strict" = "y" -a "$Copies" -eq "2" ] ; then
MLVCount=expr $MLVCount + 1
else
:
fi
if [ "$MLVCount" -eq "0" ] ; then
RCforVG=2
fi
if [ "$MLVCount" -gt "0" -a "$MLVCount" -ne "$LVCount" ] ; then
RCforVG=1
fi
done
echo "Result code for $VG: $RCforVG"
done


This do not work ¿can someone give me a hand on this?

Moderator’s Comments:
edit by bakunin: First of all, please use CODE-tags. It is mentioned in the rules, the FAQ, editor mask for new postings and we really, definitely, positively MEAN IT. Second, please do not use others threads to post your …read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Backupios Failing

By Nazar_KA

Hi Team,

Please help me to resolve the below backup (backupios) issue on my VIO.

My VIO is a SAN booted from EMC and powerpath has been installed on this.

We already run pprootdev fix and linked the /dev/ipldevice to rootvg hdisk.

==================================================================================================== ==========
/home/padmin]>lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk3 active 809 220 01..49..00..08..162

[/home/padmin]>bootinfo -b
hdisk1

/home/padmin]>lspv | grep -i rootvg
hdisk1 00f6860ba154b2b3 rootvg active
hdisk3 00f6860ba154b2b3 rootvg active

==================================================================================================== ===========
After this we are able to successfully add bosboot from AIX root prompt.

But when we exit and run backupios from VIO prompt ,it is failing with the same error.

==================================================================================================== =======
[/home/padmin]>backupios -file /viosbkup/backups/hostname_031413.mksysb -mksysb

/viosbkup/backups/hostname_031413.mksysb doesn’t exist.
Creating /viosbkup/backups/hostname_031413.mksysb
Backup in progress. This command can take a considerable amount of time to complete, please be patient…
0301-168 bosboot: The current boot logical volume, /dev/hd5,does not exist on /dev/hdisk1.

0512-008 savevg: The mkvgdata command failed. Backup canceled.
==================================================================================================== ============**

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Input buffer and READ

By gio001

Hello everyone,
Can someone please explain the input buffer behaviour for the read command in ksh93 on AIX?
I have ‘googled’ for weeks now, and did not find a satisfactory answer or solution to my dilemma.
I have the following code:

Code:

STTY=$(stty -g)
if [ -t 0 ];then
stty -echo -icanon time 0 min 0
fi
k=""
while [[ "x$k" = "x" ]];do
read k

# here is a group of command that retrieve data from several files
# and process the data summarizing and filtering it (using awk).
# This section could possibly take 1 to 2 seconds to complete its job
# the final command does a cat of the generated data file to the screen
# then the loop would start again retrieving fresh stats from files....
# ........
done
stty $STTY


How can I guarantee that the input buffer to the read will keep a key that the user presses while inside the loop execution?
When I execute the code and press any key, sometimes it exits properly, other times it takes more than one key press to exit, maybe because the key got pressed while the processing section of the loop was running.
What could be ‘chewing up’ the pressed keystroke? Did the input buffer clear?
Do you have suggestions on how to guarantee termination on a single key stroke?
Maybe I need to redesign my loop logic ?
I am open to any advice and suggestion.
Thanks to all!

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

[Howto] Update AIX in HACMP cluster-nodes

By bakunin

As i have updated a lot of HACMP-nodes lately the question arises how to do it with minimal downtime. Of course it is easily possible to have a downtime and do the version update during this. In the best of worlds you always get the downtime you need – unfortunately we have yet to find this best of worlds.

The following procedure is proven to work with AIX 5.3, 6.x and 7.x and associated HACMP/PowerHA versions. It needs only one takeover, so the downtime is from somewhere from under a minute to some minutes, depending on the nature of your resource group(s).

Communications in HACMP happens via RSCT and for a cluster to work the version of the RSCT-packages have to be in sync. Fortunately it is easy to update the RSCT independent of the rest of the OS. This is what this procedure depends on. We will consider a dual-node cluster with an active and a standby-system (rotating cluster), but the procedure can easily be adapted to other cluster-architectures.

  • Stop the clustermanager on the standby-node. This will end the cluster-communication. The remaining node will be on its own.
  • Update the RSCT-packages on both nodes. It won’t matter that the communication path over the RSCT-daemons will be disrupted, because there is nobody to communicate with anyways.
  • Optional step: If you are of the well and truly paranoid type (like me) you can now restart the clustermanager on the standby-node and do a cluster-synchronization. I never experienced any problems when i tried this procedure in a test-environment and skipped this step, but i still feel better to do it when working on a PROD-system.
  • Stop the clustermanager on the standby-system again and update the rest of AIX and/or HACMP. Because you made sure the RSCT-daemons are already updated and at a equal version it won’t do any harm if the versions of the other packages are different.
  • Once the standby-system has finished the update restart cluster-services and move the resource-group to the standby-system. This takeover will be your downtime.
  • Update now the remaining node after shutting down cluster-services. After the update finished restart cluster-services and do a cluster-synchronization. You are finished.

I hope this helps.

bakunin

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Problem with nmon, actual CPU usage per process

By zaxxon

Hi all,

I am currently having trouble to get
nmon to print me the actual CPU usage for an interval for a process.
According to the manual, something like


# time nmon -t -C cron -s 5 -c 2 -F outfile

real 0m0.98s
user 0m0.03s
sys 0m0.04s


should print out at least the process information about cron for an interval of 2 x 5 seconds.
I tried it without specifying which process (without -C) and other parameters, but no chance. I get the very general information about everyhting else in the output, but nothing about any processes.
Also what I do not understand is, why it always runs through in much less time than I specified with -s and -c.

I am currently on AIX 6100-06-05-1115, and I am not root. Though when I call nmon to be in it’s online mode and press “t”, I get the top view as non-root user.

Any help is welcome. Alternatives to get the current CPU usage for a process over a specified interval is welcome.
I also tried to get the information with
pprof but it seems it’s showing like
ps some values (ACCT_TIME) which are not working for me at all, as this seems to be the usage over time since the process was started, which is not what I am looking for. I also checked
tprof , but as it looks it only works for processes that are started with it, not for processes which are already running.

Thanks in forward!

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Handling tape errors in script

By landog

AIX 7.1
Here’s the script

Code:

#!/bin/ksh
find . -print > filelist.txt
backup -ivqf/dev/rmt0 backup.log
if [ "$?" != "0" ]; then
echo "Backup to tape failed!" >> backup.log
else
echo "Backup to tape successfull!" >> backup.log
fi
mail -v -s "Backup report" maillist < backup.log


I’d run this from cron.
But for now, while I’m testing the first time I ran it I got this message on the console:

Code:

backup: 0511-089 Cannot open /dev/rmt0: The input or output media is write-protected.
Mount volume 1 on /dev/rmt0.
Press Enter to continue.


If I had such an error running from cron, no one would see it.
How can I handle this situation?

Thanks,
-dog

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Robbie Williamson: Lock-In: Why Your OS Choice Matters in the Cloud

Public Cloud Lock-In

I ran across an article last week about the fear of cloud lock-in being a “key concern of companies considering a cloud move“.  The article was spot on in pointing out that dependence upon some of the higher level public cloud service features hinders a user’s ability to migrate to another cloud.  There is a real risk in being locked into a public cloud service, not only due to dependence on the vendor’s services, but also the complexity and costs of trying to move your data out.  The article concludes by stating that there “aren’t easy answers to this problem“, which I think is true…but I also think by simply keeping two things in mind, a user can do a lot to mitigate the lock-in risk.

1. Choose an Independently Produced Operating System

Whatever solutions you decide to deploy, it’s absolutely critical that you choose an operating system not produced by the public cloud provider.  This recent fad of public cloud providers creating their own specific OS is just history repeating itself, where HP-UX, IRIX, Solaris, and AIX are being replaced with the likes of GCEL and Amazon Linux.  Sure, the latter are Linux-based, but just like the proprietary UNIX operating systems of the past, they are developed internally, only support the infrastructure they’re designed for, and are only serviceable by the company that produces them.  Of course the attraction to using these operating systems is understandable, because the provider can offer them for “free” to users desiring a supported OS in the cloud.  They can even price services lower to customers who use their OS as an incentive and “benefit”, with the claim it allows them to provide better and faster support.   It’s a perfect solution….at first.  However, once you’ve deployed your solution to a public cloud vendor-specific OS, you have made a huge first step towards lock-in.  Sure, the provider can say their OS is based on an independently produce operating system, but that means nothing once the two have diverged due to security updates and fixes, not to mention release schedules and added features.  There’s no way the public cloud vendor OS can keep up, and they really have no incentive to, because they’ve already got you….the longer you stay on their OS, the more you will depend on their application and library versions, thus the deeper you get.  A year or two down the road, another public cloud provider pops up with better service and/or prices, but you can’t move without the risk of extended downtimes and/or loss of data, in addition to the costs of paying your IT team the overtime it will take to architect such a migration.  We’ve all been here before with proprietary UNIX and luckily Linux arrived on the scene just in time to save us.

2. Choose an Operating System with Service Orchestration Support

Most of the lock-in features provided by public clouds are simply “Services as a Service”, be it a database service,  big data/mapreduce service, or a …read more
Source: FULL ARTICLE at Planet Ubuntu

Dell Works With Red Hat, Intel and VMware To Launch Center of Excellence for Hospitals Using Epic EH

By Business Wirevia The Motley Fool

Filed under:

Dell Works With Red Hat, Intel and VMware To Launch Center of Excellence for Hospitals Using Epic EHR Software

  • New Linux-based deployment option designed to provide more flexibility, while delivering operational efficiency for EHR customers
  • Open platform sets stage for improved interoperability through industry standards

NEW ORLEANS–(BUSINESS WIRE)– Dell has joined forces with Red Hat, Intel and VMware to open a dedicated center where hospitals can test and deploy a new option for running Epic Systems‘ electronic health records (EHR) software on Red Hat Enterprise Linux. The DRIVE (Dell, Red Hat, Intel and VMware for Epic) Center of Excellence is located near the EHR vendor’s Verona, Wis., headquarters.

Last year, Epic added Red Hat Enterprise Linux to its list of target platforms. Until then, the software exclusively ran on AIX and other UNIX servers. With the potential lower total cost of ownership of running the software on Dell Intel x86 servers, this combination could be a cost-effective option for hospitals.

At the DRIVE Center of Excellence, hospitals can test their applications on a variety of Dell server and storage options, test configurations for end-user computing, perform cross-functional testing of other optimized solutions such as help desk services and disaster recovery, and interact with all the primary third parties involved in a Linux deployment.

A legacy of expertise

Dell and the other companies in this effort each have a strong history in supporting open standards and migrating customers from complex proprietary environments. In addition to hardware, Dell provides a full range of professional services and support for every stage of EHR deployment backed by technical and clinical experts with deep expertise in working with a variety of EHR vendors.

VMware vSphere® is the leading KLAS-rated x86 virtualization platform in healthcare. vSphere provides hospitals with an industry proven virtualization platform for delivering powerful solutions from the point of care to the hospital’s datacenter.

Red Hat will provide hospitals with the premium support services they need to meet the 24×7 demands placed on an EHR system. As the world’s leading open source platform for enterprises, Red Hat Enterprise Linux offers healthcare customers a standards-based, cost-effective yet highly flexible and powerful solution.

…read more
Source: FULL ARTICLE at DailyFinance

HOWTO: analyze memory usage on AIX, aka svmon "101"

By MichaelFelt

THE command on AIX for examining memory on AIX is svmon. Frequently, just the command
svmon with no arguments (defaults as
svmon -G ) is enough to get an indication of whether there is a chance of major memory problems.
(Note: the system I am displaying this from has 9G and has only been up for a few days, memory is not fully loaded. I will run the same commands from a smaller virtual system as well, to show differences between “ancient” systems such as my P615 – Power4, and “almost ancient” Power5

1. svmon -G

Code:

michael@x054:[/home/michael]svmon -G
size inuse free pin virtual mmode
memory 2359296 1778880 580416 631814 794262 Ded
pg space 131072 2372

work pers clnt other
pin 446779 0 0 185035
in use 794262 0 984618


A little hard to read – so a nice example for the man page is:

1b. svmon -G -O unit=auto,timestamp=on,pgsz=on,affinity=detail
This command output is much easier to read – sizes behind it! Notice also the small paging space. With AIX you should not need paging space. IMHO – regular (I define this as more than 3 i/o per second) paging to from paging space indicates an application and/or configuration error. In short, DO NOT page to/from paging space (paging to/from file space aka persistent storage is normal i/o).

Code:

michael@x054:[/home/michael]svmon -G -O unit=auto,timestamp=on,pgsz=on,affinity=detail
Unit: auto ...read more
Source: FULL ARTICLE at The UNIX and Linux Forums