#useradd -d /export/home/fred -m -s /bin/ksh -c “Fred Smith” fred
#useradd -c “a-Autosys Admin” -g 5998 -u 8873 -k /etc/skel -s “/bin/ksh”
#useradd -d /export/home/fred -m -s /bin/ksh -c “Fred Smith” fred
#useradd -c “a-Autosys Admin” -g 5998 -u 8873 -k /etc/skel -s “/bin/ksh”
Syntax:
ssh -q “command”
Example:
#ssh -q server1 “lsuser -f username | grep account_locked”
From ‘sc>’ prompt to switch to console prompt type ‘console’.
sc> console
From console to ‘sc>’ prompt type ‘#.’
From ‘sc>’ prompt you can poweroff and poweron the system.
Check status
#passwd -s userid
Unlock
#passwd -u userid
Lock
#passwd -l userid
Turn off password aging for user
#passwd -x -1 userid
Turn off password aging and require to change password at next login
#passwd -x 0 userid
Create a volume group that contains 3 physical volumes with partition size set to 64 megabyte
# mkvg -s 64 hdisk2 hdisk3 hdisk4
Create volume group using all unused “None status” disks
# mkvg -S -y datavg -s ’64’ -n `lspv|grep None| awk ‘{print $1}’| xargs`
reference:
https://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds3/mkvg.htm
http://unix.worldiswelcome.com/how-to-create-volume-group
1. If creating the volume group from scratch, verify which disk to use to create the volume group. (note: Assuming that disk has already been added)
# fdisk -l
Disk /dev/sdb doesn’t contain a valid partition table.
2. Create the partition inside the added disk and verify.
# cfdisk /dev/sdb
# fdisk -l
3. Create the physical volume with pvcreate and verify using pvdisplay
# pvcreate /dev/sdb1
# pvdisplay /dev/sdb1
4. Create the volume group using vgcreate and verify with vgdisplay.
# vgcreate new_vg /dev/sdb1
# vgdisplay
If adding disk with more than one partition
# vgcreate new_vg /dev/sdb1 /dev/sdb2
# vgdisplay
Linux
Shutdown putting server to halt
# /sbin/shutdown -h now
Shutdown with reboot
# /sbin/shutdown -r now
OR
# reboot
You may also use
# halt
# poweroff
Using init command e.g. init 6
0 — Halt
1 — Single-user text mode
2 — Not used (user-definable)
3 — Full multi-user text mode
4 — Not used (user-definable)
5 — Full multi-user graphical mode (with an X-based login screen)
6 — Reboot
AIX
Shutdown and power off bypassing messages to users (No grace period)
# shutdown -F
Shutdown and reboot
# shutdown -Fr
To enter single user user mode, use -m flag
# shutdown -m
OR
# shutdown -m now
Solaris
Shutdown immediately
# shutdown -y -i5 -g0
OR
# sync;sync;init 5
OR
# poweroff
Reboot
# shutdown -y -i6 -g0
OR
# sync;sync;init 6
OR
# reboot
Verify free space in volume group.
# vgdisplay appvg
Extend the filesystem with 50Gb of space
# lvextend -L +50G /dev/mapper/appvg-backup
Resize the filesystem to expand the actual size online and verify.
# resize2fs /dev/mapper/appvg-backup
# df -kh /dev/mapper/appvg-backup
Check the size and the logical volume name of the file system
# df -g /usr/WebSphere
Check the which volume group the logical volume belongs
# lslv lv_name
Check the volume group for free space
# lsvg vg_name | grep FREE
Extend the filesystem with 5Gb e.g. /usr/WebSphere
# chfs -a size=+5G /usr/WebSphere
Verify
# df -g /usr/WebSphere
To add a new record to the /etc/inittab file, telling the init command to handle a login on tty2, enter:
# mkitab “tty002:2:respawn:/usr/sbin/getty /dev/tty2”
To add a new record to the /etc/inittab file, telling the init command to execute the /etc/rc.tcpip file after the /usr/sbin/srcmstr file is started, enter:
# mkitab -i srcmstr “rctcpip:2:wait:/etc/rc.tcpip > /dev/console”
To add a new record to the /etc/inittab file, telling the init command to execute the /etc/rc file and send its output to the boot log, enter:
# mkitab ((rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console))