UnixPedia : HPUX / LINUX / SOLARIS: April 2014

Wednesday, April 30, 2014

HPUX: Root Password issue.



Root Password issue.
Overview
Root Passwd : After repeat of reseting the password and still Login prompt is not accepting the root passwd.
Procedures
Root Passwd : After repeat of reseting the password and still Login prompt is not accepting the root passwd.

[root@Mickey:/sbin/init.d]#
#-> /usr/lbin/getprpw root
user password file not found: root
[root@Mickey:/sbin/init.d]#

Root login is not able to accept the root password above error is encounter.


[root@Mickey:/tcb/files/auth/r]#
#-> /usr/lbin/getprpw root
user password file not found: root

It was later found that nsswitch.conf file which refer the Database for user ,group, host  etc has been change. Some pplication replace it with formate which is used in Linux System.

  /etc/nsswitch.conf

 DESCRIPTION
      The operating system uses a number of "databases" of information about
      hosts, users (passwd), groups and so forth.  Data for these can come
      from a variety of sources:  host-names and -addresses, for example,
      may be found in /etc/hosts, NIS, LDAP, or DNS.  One or more sources
      may be used for each database; the sources and their lookup order are
      specified in the /etc/nsswitch.conf file.


[root@Mickey:/tcb/files/auth/r]#
#-> cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#       compat                  Use Libc5 compatibility setup
#       nisplus                 Use NIS+ (NIS version 3)
#       nis                     Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service) for IPv4 only
#       dns6                    Use DNS for IPv4 and IPv6
#       files                   Use the local files
#       db                      Use the /var/db databases
#       [NOTFOUND=return]       Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#

# passwd: files nis
# shadow: files nis
# group:  files nis

passwd: centrifydc  compat
group: centrifydc   compat

hosts:      files dns dns6
networks:       files

services:       files
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       files
publickey:      files

bootparams:     files
automount:      files
aliases:        files

[root@Mickey:/tcb/files/auth/r]#
.

RESOLUTION.

Format of nsswitch.conf file has been correct as per HPUX System. Then root password issue has been resolved.
Keywords.
Passwd, getprpw

Saturday, April 26, 2014

REDHAT : YUM : Yellowdog update manager commands.



YUM : Yellowdog update manager commands.
Overview
YUM : Yellowdog update manager commands
Procedures
.
Keywords.
yum

Friday, April 25, 2014

HPUX : Umask wrapper for account



Umask wrapper for account.
Overview
Umask wrapper for account
Procedures
Create a file /usr/local/bin/umask-wrapper with the following contents

#!/usr/bin/ksh

umask 022
exec /usr/bin/ksh -c "${SSH_ORIGINAL_COMMAND:-$SHELL}"

#make the file executable : /usr/local/bin/umask-wrapper
and then edit the ssh configuration file /etc/opt/ssh/sshd_config and add the following lines in the end

Match User monora
ForceCommand /usr/local/bin/umask-wrapper


This should help in picking up the desired umask value  for monora user. It will not affect other users as the script will only be executed for monora user.
Keywords.
Sshd, umask.

VXVM : How to create mirrored Volume in veritas Volume manager.



How to create mirrored Volume in veritas Volume manager.
Overview
How to create mirrored Volume in veritas Volume manager
Procedures
1> For creating mirrored volume in Veritas Volume manager we will require minimum Two Disks.
2> First Step is to initialize both Disl into VXVM using below Command.
# cd /etc/vx/bin
#./vxdisksetup –i sde format=sliced
#./vxdisksetup –i sdf format=sliced
3> After initilizing the disk in error status will become online.
4> Now initialize the first to create a Disk Group using below command
# vxdg init newdg newdg01 =sde cds=off
5> Now add second disk to diskgroup newdg using below command.
# vxdg -g newdg adddisk newdg02 =sdf
Use below command to see the output
[root@myserver /]vxdisk list
DEVICE TYPE DISK GROUP STATUS
sda auto:none - - online invalid
sdb auto:none - - online invalid
sdc auto:none - - online invalid
sdd auto:none - - online invalid
sde auto:sliced newdg01 newdg online
sdf auto:sliced newdg02 newdg online
6> Now create a volume using vxassist command. We are not creating subdisk and plex manulally
as there may be confussion in naming conventions and also we have to be more precise while
creating the plex and subdisk. Vxassist command will directly create subdisk, plex and volume.
Kinldy see the command below.
# vxassist -g newdg make newcol01 100M layout=mirror
7> Below command will display the Details of the created volume
#vxprint –g newdg –htq new newcol01
8> Command to check if volume is startable or now use below command
#vxinfo –g newdg (newdg is name of the diskgroup).
9> Make the format the file system using below command
# mkfs –t vxfs /dev/vx/rdsk/newdg/newcol01
10> Make the mount pouint using below command
#mkdir /new1
11> Mount the filesystem using below command
# mount –t vxfs /dev/vx/dsk/newdg/newcol01 /new1
Keywords.
Vxdg,vxprint,vxstat,vxtask,vxassist.