Posts

Xclock does not work after switch to another user

suppose that user1 can run xclock and after switch to user2 xclock does not work does not matter if user1 or user2 is root you need to import the following values from user1 to user2 For KSH Shell $user1:/> xclock $user1:/>su - user2 $user2:/> xclock Error: Can't open display: $user2:/>exit  $user1:/>xauth list hostname/unix:10  MIT-MAGIC-COOKIE-1  630b2e7a7a794022834b0783b6f471fa hostname/unix:11  MIT-MAGIC-COOKIE-1  dbdcd6d69b9b3002484c4ea1e29a2ad5 hostname/unix:12  MIT-MAGIC-COOKIE-1  745ca626d4ef81101ef744589b4cfb09 $user1:/>echo $DISPLAY localhost: 11.0   (Hint : choose the matching values)  $user1:/>su - user2  $user2:/>xauth add hostname/unix:11  MIT-MAGIC-COOKIE-1  dbdcd6d69b9b3002484c4ea1e29a2ad5   $user2:/>export DISPLAY=localhost:11.0 $user2:/> xclock For CSH Shell $user2:/>xauth add hostname/unix:11  MIT-MAGIC-COOKIE-1  dbdcd6d69...

Move a file system to another volume group

How to move FS to anotherVG UNMOUNT fs Copy the source logical volume to the desired volume group with the cplv command. For example, where myvg is the new volume group and mylv is the name of the user's logical volume, enter:        cplv -v myvg mylv This will return the name of the new logical volume, such as lv00. 2- To make a new JFS log, enter the following command, where myvg is the name of the new volume group, enter:        mklv -t jfslog  myvg 1 To make a new JFS2 log, enter:      mklv -t jfs2log  myvg 1 ** This new logical volume will need to be formatted with the logform command in order to function properly as either a JFS or JFS2 log. For example:        logform /dev/loglv00 Answer yes to destroy. 3-Change the filesystem to reference a log device that exists in the new volume group and the new logical volume with the chfs command. For example, where ...

Backup to a remote tape device

The scenarios is as follows: Machine A : We need to take an mksysb image on a tape. The tape should be bootable. The machine does not have access to a tape drive. Machine B: Does have access to a tape drive and is connected to machine A via LAN. Procedure: A bootable tape as a result of mksysb contains 4 records (set of data). BOS Boot Image - contains a copy of the system's kernel and device drivers needed to boot from the tape. mkinsttape Image ./image.data - holds the information needed to recreate the root volume group and its logical volumes and file systems. ./bosinst.data - contains the customizable install procedures and dictates how the BOS install program will behave. This file allows for the non-interactive installs. Dummy "Table of Content" used to make mksysb tapes have the same number of files as BOS install tapes. Steps: (our working directory on both servers will be /opt) Machine A: Create a bootable image on machine A: Code: bosb...

Breaking mirrors on an existing mksysb

To restore a mksysb without mirroring. the following procedure can be used NOTE: Access to another AIX system and an AIX formatted diskette is required to perform this procedure.  All references to the tape device in the next section are as rmt0. On another AIX system, place the mksysb tape in the tape drive. Change the block size of the tape drive to 512 by running: chdev -l rmt0 -a block_size=512   Create a temporary directory in /tmp called newdata .   mkdir /tmp/newdata Change to the /tmp/newdata directory. Enter:   cd /tmp/newdata    Make sure that the tape is rewound. Enter: tctl -f /dev/rmt0 rewind    Restore the image.data file from the second image of the mksysb tape. Enter: restore -s2 -xqvf /dev/rmt0.1 ./image.data    Edit the /tmp/newdata/image.data file and make c...

Creating a mksysb without mirroring

Creating a mksysb without mirroring If the ability to retrun the mksysb is available, the following procedure will allow you to create a mksysb without preserving mirroring.  To create a new image.data file, run the following command:  mkszfile  Change into the / directory and vi the image.data file. Enter: cd / vi image.data  The following examples show an lv_data stanza of an image.data file. The first example is with mirroring, while the second example shows the edited version without mirroring. The lines that need changes are marked by --> and are boldfaced. In the second example, the changes are made to those lines.        To view and edit the file,enter:  vi image.data Example 1     lv_data:                 VOLUME_GROUP= rootvg                 LV_SOURCE_DISK_LIST= hdisk0 ...

NTP Sync. Problem

ntpdate[331858]: the NTP socket is in use, exiting  Stop ntp daemon :> stopsrc -s xntpd Try to update again:> ntpdate pool.ntp.org Start ntp daemon :> startsrc -s xntpd

Installing and configuring the storage agent (AIX)

The storage agent must be installed on a client system that has connections to storage resources on the SAN. Before beginning this procedure: Verify that your system meets the hardware and software requirements. Be sure that you have the information recorded in the configuration-information work sheets. Close all existing Tivoli® Storage Manager products prior to installing the storage agent. Installation will stop if an active Tivoli Storage Manager process is detected. If this occurs, close all active Tivoli Storage Manager products and retry installing the storage agent. The storage agent honors the Tivoli Storage Manager server environment variables DSMSERV_CONFIG. The instructions in this section are shown using the Software Management and Installation Tool (SMIT). You can also use the Install and Update Software Manager (installm). To reduce workload and processing time and to optimize LAN-free performance, do not install the storage agent and the Tivoli Storag...

Create/rebuild a new .Xauthority file

This document describes the procedure for rebuilding a /$HOME/.Xauthority file. The information in this document applies to AIX 5.1 and higher. If you get an MIT magic cookie error when trying to gain remote access the CDE or Xdm, you may be able to solve the problem by rebuilding the .Xauthority file in the home directory of the user trying to log in. Follow these steps to create a /$HOME/.Xauthority file. Log in as user and confirm that you are in the user's home directory. Rename the existing .Xauthority file by running the following command mv .Xauthority old.Xauthority Generate a new .Xauthority file by running the following command: xauth generate :0 . trusted At the command line, create a new magic-cookie key by entering the following: randomkey=`/usr/bin/ksh -c 'echo $(( $RANDOM * $RANDOM * 2 ))'` Add a new entry for another server by running the following command: xauth add ${HOST}:0 . $randomkey To view a listing of the .Xauthority ...

Xmanger does not work

when i was trying to login by Xmanger give the following error usr/bin/X11/xauth: 1356-361 Timeout in locking authority file /home/user-name/.Xauthority the solution log to the server by command line and run the following command $ xauth -b "Attempting to break locks on authority file /.Xauthority Using authority file /.Xauthority" exit to test run xclock

Recover root password

Resetting an unknown root password The following procedure describes how to recover access to root privileges when the system's root password is unavailable or unknown. The following procedure requires some system downtime. If possible, schedule your downtime when it least impacts your workload to protect yourself from a possible loss of data or functionality. The information in this how-to scenario was tested using specific versions of AIX®. The results you obtain might vary significantly depending on your version and level of AIX. Insert the product media for the same version and level as the current installation into the appropriate drive. Power on the machine. When the screen of icons appears, or when you hear a double beep, press the F1 key repeatedly until the System Management Services menu appears. Select Multiboot. Select Install From. Select the device that holds the product media and then select Install. Select the AIX version ...

Resolve ISC Admin Center password expiration

Problem(Abstract) The administrator logs in to the ISC (Integrated Solution Console), but when they try to access a TSM Server from the Admin Center (AC), it fails saying the TSM administrator password has expired and to reset it from the service property notebook. When the ISC administrator tries to reset the password from the Administration Center (AC) service property notebook it also fails, saying that the administrator password has expired. Resolving the problem To reset the TSM administrator password in AC for a TSM server, delete and recreate the TSM server connection within Admin Center, which will allow you to enter and use the current TSM administrator password. 1. Delete the server connection. From ISC -> TSM -> Server Maintenance, select the drop down action: Remove Server Connection 2. Update the TSM administrator password from the TSM administration command line (dsmadmc): update admin 3. Recreate the TSM server connection wit...

AIX ERRORS

when i trying increase file systems i get that error 0516-404 allocp: This system cannot fulfill the allocation request. There are not enough free partitions or not enough physical volumes to keep strictness and satisfy allocation requests. The command should be retried with different allocation characteristics. this due to at rootvg there exist mirror and containing two disks hdisk0 & hdisk1 when i execute the lspv hdisk0 & lspv hdisk1 i found that there exist space of one and not the other to solve that decrease one of file system from the disk have not free space

Support for passwords greater than 8 characters

In AIX 5.2 and 5.3(pre TL7), there has been a 8 character password limitation when using the one-way hash function crypt(). AIX 5.3 TL7 and AIX 6.1 introduce Loadable Password Algorithm (LPA). Each supported password encryption algorithm is implemented as a LPA load module that is loaded at runtime when the algorithm is needed. The supported LPAs, and its attributes, are defined in system configuration file /etc/security/pwdalg.cfg. ---------------------------------------------------------------------------------- the different algorithms are MD5---------------->255 SHA1--------------->255 SHA265------------->255 SHA512------------->255 Blowfish----------->72 -------------------------------------------------------------------------------- NOTE: Without the pwd_algorithm entry in /etc/security/login, the default value is "crypt" which is the legacy crypt() function. ---------------------------------------------------------------------------------...

AIX useful links

AIX infocenter http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic= IBM AIX OS: Everything about AIX http://aix.lap.hu/ Taking mksysb image of an installed AIX system using NIM http://markelov.org/wiki/index.php/Taking_mksysb_image_of_an_installed_AIX_system_using_NIM AIX errors codes http://publib.boulder.ibm.com/infocenter/ts7680/serv/index.jsp?topic=%2Fcom.ibm.storage.3958.service.doc%2Fts7740_exxxprogcodes_2nwwoq.html

Capturing Error Code @ DOS

echo %errorlevel% to pass command line error if %errorlevel% neq 0 goto label

Control Growing Files

• /var/adm/wtmp &• /etc/security/failedlogin there exist two wayes 1- cat /dev/null > /var/adm/wtmp 2- > /etc/security/failedlogin • /var/adm/sulog • /var/spool/*/* 1. stopsrc -s qdaemon 2. rm /var/spool/lpd/qdir/* 3. rm /var/spool/lpd/stat/* 4. rm /var/spool/qdaemon/* 5. startsrc -s qdaemon • $HOME/smit.log • $HOME/smit.script • $HOME/websm.log • $HOME/websm.script This command will print the number of blocks used by each directory and file in the root. find . -type d -exec du -s {} \; You can search for "large" files by cd'ing to a suspect directory ( or even starting at /, if you must), and typing find . -size +5000 -print will print the names of all files over 5,000 blocks (2,560,000) bytes. This may find many, many files, so you might want to refine it with larger numbers. You might also want to sort it: find / -size +2000 -exec ls -s{} \; | sort -nr | more to print all files that change in current directory at last 24 hours f...

craete alias

to creat alias by a user vi /$HOME/.profile and set a value of variable  ENV="$HOME/.kshrc" then edit at .kshrc file alias alias_name= 'commands_to_execute' ex: alias tsmstart = ' cd /usr/tivoli/tsm/server/bin; nohup ./rc.admserv & '

Open a new dtterm

To open a new term at background dtterm -name term_name &

Useful link for tsm administrators

http://www.tsmguide.co.cc/ http://lazysystemadmin.blogspot.com

Important TSM server files

dsmserve.opt   contains all server details. dsmserv.dsk     contains location of the DB & LOG volumes devconfig.out   all the information about the devices which used in TSM volhist.out        all the sequential access volumes details which used in the TSM server