Find partition for lunix
================
lsblk -io KNAME, TYPE, SIZE, MODEl
fdisk -l
975 df -kh
976 fdisk -l
977 lsblk -io KNAME, TYPE, SIZE, MODEl
978 lsblk -io NAME, TYPE, SIZE, MODEl
979 lsblk -io TYPE, SIZE, MODEl
980 lsblk -io
981 lsblk -all
982 lsblk -io NAME, SIZE, TYPE,
983 lsblk -io NAME SIZE TYPE MOUNTPOINT
984 lsblk -al NAME SIZE TYPE MOUNTPOINT
985 lsblk -all
986 lshw -class disk
987 lshw disk
988 lshw
989 ls
990 hwinfo --disk
============
lsblk -o name,mountpoint
output result:
lsblk -o name,mountpoint
NAME MOUNTPOINT
sda
├─sda1 /boot
├─sda2 /tmp
├─sda3 /usr
├─sda4
├─sda5 [SWAP]
├─sda6 /var
└─sda7 /
sdb
├─sdb1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sdc
├─sdc1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdd
├─sdd1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sde
├─sde1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdf
├─sdf1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdg
├─sdg1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdh
├─sdh1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdi
├─sdi1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdj
├─sdj1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sdk
├─sdk1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdl
├─sdl1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sdm
├─sdm1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdn
├─sdn1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdo
├─sdo1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdp
├─sdp1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdq
├─sdq1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdr
├─sdr1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sds
├─sds1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdt
├─sdt1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sdu
├─sdu1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdv
├─sdv1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdw
├─sdw1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdx
├─sdx1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdy
├─sdy1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdz
├─sdz1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sr0
sdaa
├─sdaa1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdab
├─sdab1
└─mpathh (dm-3)
└─mpathhp1 (dm-6) /u01
sdac
├─sdac1
└─mpathg (dm-1)
└─mpathgp1 (dm-4) /u03
sdad
├─sdad1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdae
├─sdae1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdaf
├─sdaf1
└─mpathf (dm-0)
└─mpathfp1 (dm-2) /u02
sdag
├─sdag1
└─mpathi (dm-5)
└─mpathip1 (dm-7) /u04
sdah
├─sdah1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdai
├─sdai1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdaj
├─sdaj1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdak
├─sdak1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdal
├─sdal1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdam
├─sdam1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdbb
├─sdbb1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdan
├─sdan1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdbc
├─sdbc1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdao
├─sdao1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdap
├─sdap1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdbf
├─sdbf1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdaq
├─sdaq1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdbg
├─sdbg1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdar
├─sdar1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdas
├─sdas1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdat
├─sdat1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdbj
├─sdbj1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdau
├─sdau1
└─mpathj (dm-8)
└─mpathjp1 (dm-10) /u05
sdbk
├─sdbk1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdav
├─sdav1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdca
├─sdca1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
sdaw
├─sdaw1
└─mpathk (dm-9)
└─mpathkp1 (dm-11) /u06
sdcb
├─sdcb1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
sdax
├─sdax1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdbn
├─sdbn1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdcc
├─sdcc1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
sday
├─sday1
└─mpathl (dm-12)
└─mpathlp1 (dm-14) /u07
sdbo
├─sdbo1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdcd
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdce
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdbp
├─sdbp1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdcf
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdbq
├─sdbq1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdcg
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdbr
├─sdbr1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdch
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdbs
├─sdbs1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdci
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdbt
├─sdbt1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdcj
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdbu
├─sdbu1
└─mpathn (dm-16)
└─mpathnp1 (dm-17) /u09
sdck
└─mpathp (dm-20)
└─mpathpp1 (dm-21) /archivelog
sdbv
├─sdbv1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
sdbw
├─sdbw1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
sdbx
├─sdbx1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
sdby
├─sdby1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
sdbz
├─sdbz1
└─mpatho (dm-18)
└─mpathop1 (dm-19)
mpathm (dm-13)
===================
lsblk -o name,size,mountpoint
NAME SIZE MOUNTPOINT
sda 1.1T
├─sda1 500M /boot
├─sda2 200G /tmp
├─sda3 200G /usr
├─sda4 1K
├─sda5 128G [SWAP]
├─sda6 100G /var
└─sda7 488.8G /
sdb 500G
├─sdb1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sdc 500G
├─sdc1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdd 500G
├─sdd1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sde 500G
├─sde1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdf 1T
├─sdf1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdg 600G
├─sdg1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdh 1T
├─sdh1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdi 600G
├─sdi1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdj 500G
├─sdj1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sdk 500G
├─sdk1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdl 500G
├─sdl1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sdm 500G
├─sdm1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdn 1T
├─sdn1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdo 600G
├─sdo1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdp 1T
├─sdp1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdq 600G
├─sdq1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdr 500G
├─sdr1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sds 500G
├─sds1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdt 500G
├─sdt1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sdu 500G
├─sdu1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdv 1T
├─sdv1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdw 600G
├─sdw1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdx 1T
├─sdx1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdy 600G
├─sdy1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdz 500G
├─sdz1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sr0 1024M
sdaa 500G
├─sdaa1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdab 500G
├─sdab1 500G
└─mpathh (dm-3) 500G
└─mpathhp1 (dm-6) 500G /u01
sdac 500G
├─sdac1 500G
└─mpathg (dm-1) 500G
└─mpathgp1 (dm-4) 500G /u03
sdad 1T
├─sdad1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdae 600G
├─sdae1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdaf 1T
├─sdaf1 1024G
└─mpathf (dm-0) 1T
└─mpathfp1 (dm-2) 1024G /u02
sdag 600G
├─sdag1 600G
└─mpathi (dm-5) 600G
└─mpathip1 (dm-7) 600G /u04
sdah 1T
├─sdah1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdai 1T
├─sdai1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdaj 500G
├─sdaj1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdak 500G
├─sdak1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdal 1T
├─sdal1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdam 1T
├─sdam1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdbb 500G
├─sdbb1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdan 500G
├─sdan1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdbc 500G
├─sdbc1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdao 500G
├─sdao1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdap 1T
├─sdap1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdbf 500G
├─sdbf1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdaq 1T
├─sdaq1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdbg 500G
├─sdbg1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdar 500G
├─sdar1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdas 500G
├─sdas1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdat 1T
├─sdat1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdbj 500G
├─sdbj1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdau 1T
├─sdau1 1024G
└─mpathj (dm-8) 1T
└─mpathjp1 (dm-10) 1024G /u05
sdbk 500G
├─sdbk1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdav 500G
├─sdav1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdca 2T
├─sdca1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
sdaw 500G
├─sdaw1 500G
└─mpathk (dm-9) 500G
└─mpathkp1 (dm-11) 500G /u06
sdcb 2T
├─sdcb1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
sdax 500G
├─sdax1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdbn 500G
├─sdbn1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdcc 2T
├─sdcc1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
sday 500G
├─sday1 500G
└─mpathl (dm-12) 500G
└─mpathlp1 (dm-14) 500G /u07
sdbo 500G
├─sdbo1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdcd 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdce 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdbp 500G
├─sdbp1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdcf 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdbq 500G
├─sdbq1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdcg 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdbr 500G
├─sdbr1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdch 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdbs 500G
├─sdbs1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdci 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdbt 500G
├─sdbt1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdcj 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdbu 500G
├─sdbu1 500G
└─mpathn (dm-16) 500G
└─mpathnp1 (dm-17) 500G /u09
sdck 1T
└─mpathp (dm-20) 1T
└─mpathpp1 (dm-21) 1024G /archivelog
sdbv 2T
├─sdbv1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
sdbw 2T
├─sdbw1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
sdbx 2T
├─sdbx1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
sdby 2T
├─sdby1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
sdbz 2T
├─sdbz1 2T
└─mpatho (dm-18) 2T
└─mpathop1 (dm-19) 2T
mpathm (dm-13) 1T
You have mail in /var/spool/mail/root
=============================
Sunday, 1 December 2019
Tuesday, 26 November 2019
SAN Switch update
firmwaredownload example:
switch:admin> firmwaredownload Server Name or IP Address: IP.TO.SCP.SERVER User Name: username File Name: /path/to/v6.2.2e Network Protocol(1-auto-select, 2-FTP, 3-SCP) [1]: 3 Password: Server IP: IP.TO.SCP.SERVER, Protocol IPv4 Checking system settings for firmwaredownload... System settings check passed. You can run firmwaredownloadstatus to get the status of this command. This command will cause a warm/non-disruptive boot on the switch, but will require that existing telnet, secure telnet or SSH sessions be restarted. Do you want to continue [Y]: y Firmware is being downloaded to the switch. This step may take up to 30 minutes. Preparing for firmwaredownload... Start to install packages... dir ################################################## [[lots of these for all packets]] ################################################## [[also stuff like these are seen many times:]] warning: /etc/fabos/pki/switch.0.rootcrt created as /etc/fabos/pki/switch.0.rootcrt.rpmnew kernel-module-ipsec ################################################## Removing unneeded files, please wait ... Finished removing unneeded files. All packages have been downloaded successfully. Firmware has been downloaded to the secondary partition of the switch. HA Rebooting ...
Thursday, 10 October 2019
Windows NFS
Install the NFS Client (Services for NFS)
The first thing we need to do is install the NFS Client which can be done by following the steps below:Step 1: Open Programs and Features.

Step 2: Click Turn Windows features on or off.

Step 3: Scroll down and check the option Services for NFS, then click OK.

Step 4: Once installed, click Close and exit back to the desktop.
Enable Write Permissions for the Anonymous User
With the default options you will only have read permissions when mounting a UNIX share using the anonymous user. We can give the anonymous user write permissions by changing the UID and GID that it uses to mount the share.The image below shows the a share mounted using the default settings.

To change the UID and GID we need to make a simple change to the Windows registry by performing the following steps:
- Open regedit by typing it in the search box end pressing Enter.
- Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default.
- Create a new New DWORD (32-bit) Value inside the Default folder named AnonymousUid and assign the UID found on the UNIX directory as shared by the NFS system.
- Create a new New DWORD (32-bit) Value inside the Default folder named AnonymousGid and assign the GID found on the UNIX directory as shared by the NFS system.

- Restart the NFS client or reboot the machine to apply the changes.
Local Remote Properties
-------------------------------------------------------------------------------
Z: \\10.1.1.211\mnt\vms UID=0, GID=0
rsize=1048576, wsize=1048576
mount=soft, timeout=1.6
retry=1, locking=yes
fileaccess=755, lang=ANSI
casesensitive=no
sec=sys
Notice the 0 value applied to the UID and GID. This means the share is mounted using the root user.How to Mount an NFS Share
Assuming your NAS device is on the same network as your Windows machine and the IP address of the device is 10.1.1.211, the following command will mount a share on the NFS system at /mnt/vms.C:\Users\windows>mount -o anon \\10.1.1.211\mnt\vms Z:
Z: is now successfully connected to \\10.1.1.211\mnt\vms
The command completed successfully.
The share is now mounted and we can access the data by navigating to the Z: drive.
That’s it, we can now write to the NAS device. Although, I did notice that trying to open the share for the first time takes a long time.
Tuesday, 24 September 2019
install and configure FreeIPA on Red Hat Linux
server's /etc/hosts file pointing to itself:
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.122.147 rhel7.ipa.linuxconfig.org rhel7
And the hostname provided in the hosts file MUST be the FQDN of the machine.
# hostname
rhel7.ipa.linuxconfig.org
This is an important step, don't miss it. The same hostname needed in the network file:
# grep HOSTNAME /etc/sysconfig/network
HOSTNAME=rhel7.ipa.linuxconfig.org
yum command will do:
# yum install ipa-server ipa-server-dns
On a base install, yum will provide a long list of
dependencies, including Apache Tomcat, Apache Httpd, 389-ds (the LDAP
server), and so on. After yum finishes, open the ports needed on the
firewall:
# firewall-cmd --add-service=freeipa-ldap
success
# firewall-cmd --add-service=freeipa-ldap --permanent
success
Setup
# ipa-server-install
The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.
This includes:
* Configure a stand-alone CA (dogtag) for certificate management
* Configure the Network Time Daemon (ntpd)
* Create and configure an instance of Directory Server
* Create and configure a Kerberos Key Distribution Center (KDC)
* Configure Apache (httpd)
* Configure the KDC to enable PKINIT
To accept the default shown in brackets, press the Enter key.
WARNING: conflicting time&date synchronization service 'chronyd' will be disabled
in favor of ntpd
## we'll use the integrated DNS server
Do you want to configure integrated DNS (BIND)? [no]: yes
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.
## pressing 'enter' means we accept the default in the bracelets
## this is the reason we set up the proper FDQN for the host
Server host name [rhel7.ipa.linuxconfig.org]:
Warning: skipping DNS resolution of host rhel7.ipa.linuxconfig.org
The domain name has been determined based on the host name.
## now we don't have to type/paste domain name
## and the installer don’t need to try setting the host’s name
Please confirm the domain name [ipa.linuxconfig.org]:
The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.
## the Kerberos realm is mapped from the domain name
Please provide a realm name [IPA.LINUXCONFIG.ORG]:
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the
instance of directory server created for IPA.
The password must be at least 8 characters long.
## Directory Manager user is for the low-level operations, like creating replicas
Directory Manager password:
## use a very strong password in a production environment!
Password (confirm):
The IPA server requires an administrative user, named 'admin'.
This user is a regular system account used for IPA server administration.
## admin is the "root" of the FreeIPA system – but not the LDAP directory
IPA admin password:
Password (confirm):
Checking DNS domain ipa.linuxconfig.org., please wait ...
## we could setup forwarders, but this can be set later as well
Do you want to configure DNS forwarders? [yes]: no
No DNS forwarders configured
Do you want to search for missing reverse zones? [yes]: no
The IPA Master Server will be configured with:
Hostname: rhel7.ipa.linuxconfig.org
IP address(es): 192.168.122.147
Domain name: ipa.linuxconfig.org
Realm name: IPA.LINUXCONFIG.ORG
BIND DNS server will be configured to serve IPA domain with:
Forwarders: No forwarders
Forward policy: only
Reverse zone(s): No reverse zone
Continue to configure the system with these values? [no]: yes
## at this point the installer will work on its own,
## and complete the process in a few minutes. The perfect time for coffee.
The following operations may take some minutes to complete.
Please wait until the prompt is returned.
Configuring NTP daemon (ntpd)
[1/4]: stopping ntpd ...
The output of the installer is rather long, you can see as all
components configured, restarted, and verified. At the end of the
output, there some steps needed for full functionality, but not for the
installation process itself. ... The ipa-client-install command was successful
==============================================================================
Setup complete
Next steps:
1. You must make sure these network ports are open:
TCP Ports:
* 80, 443: HTTP/HTTPS
* 389, 636: LDAP/LDAPS
* 88, 464: kerberos
* 53: bind
UDP Ports:
* 88, 464: kerberos
* 53: bind
* 123: ntp
2. You can now obtain a kerberos ticket using the command: 'kinit admin'
This ticket will allow you to use the IPA tools (e.g., ipa user-add)
and the web user interface.
Be sure to back up the CA certificates stored in /root/cacert.p12
These files are required to create replicas. The password for these
files is the Directory Manager password
As the installer points out, be sure to backup the CA cert, and open additional needed ports on the firewall. Now let's enable home directory creation on login:
# authconfig --enablemkhomedir –-update
Verification
We can start testing if we have a working service stack. Let's test if we can get a Kerberos ticket for the admin user (with the password given to the admin user during install): # kinit admin Password for admin@IPA.LINUXCONFIG.ORG : # klist Ticket cache: KEYRING:persistent:0:0 Default principal: admin@IPA.LINUXCONFIG.ORG Valid starting Expires Service principal 2018-06-24 21.44.30 2018-06-25 21.44.28 krbtgt/IPA.LINUXCONFIG.ORG@IPA.LINUXCONFIG.ORG The host machine is enrolled into our new domain, and the default rules grant ssh access to the above-created admin user to all enrolled host. Let's test if these rules work as expected by opening ssh connection to localhost: # ssh admin@localhost Password: Creating home directory for admin. Last login: Sun Jun 24 21:41:57 2018 from localhost $ pwd /home/admin $ exit Let's check the status of the whole software stack:# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
ntpd Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful
And - with the Kerberos ticket acquired earlier - ask for information about the admin user using the CLI tool:# ipa user-find admin
--------------
1 user matched
--------------
User login: admin
Last name: Administrator
Home directory: /home/admin
Login shell: /bin/bash
Principal alias: admin@IPA.LINUXCONFIG.ORG
UID: 630200000
GID: 630200000
Account disabled: False
----------------------------
Number of entries returned 1
---------------------------- we installed a self-signed root certificate, the browser will warn us about it.
The default page after login shows the list of our users, where now only the admin user appears.
Monday, 16 September 2019
user Disable foe Linux
1. Lock the password
# usermod -L testuser
# passwd -l testuser
2. Expire the user account
# chage -E0 testuser
3. Changing the shell
# usermod -s /sbin/nologin [username]
Verify if the account is locked or disabled.
1. Check if the user account is locked.Check for the flag *LK* in the below command output which indicates that the account is locked.
# passwd --status root root *LK* 2017-07-19 0 45 7 -1 (Password set, SHA512 crypt.)
Check for the lines Password expires and Account expires to check if the account password is expired.
# chage -l root Last password change : Jul 19, 2017 Password expires : Sep 02, 2017 Password inactive : never Account expires : Sep 02, 2017 Minimum number of days between password change : 0 Maximum number of days between password change : 45 Number of days of warning before password expires : 7
Check if the user shell has been changed to a non-interactive shell like /sbin/nologin.
# grep ^root /etc/passwd root:x:0:0:root:/root:/sbin/nologin
++++++++++++++++++++++++++++++++++++++++
Linux check user password expiration using chage
- Open the terminal application
- Type chage -l userName command to display password expiration information for Linux user account.
- The -l option passed to the change show account aging information.
- Check tom user’s password expiry time, run: sudo chage -l tom
View account again information on Linux
To see account aging information such as expiry date and time, enter:chage -l {userNameHere} chage -l userNameHere |
$ chage -l vivekSample outputs:
Last password change : Jan 10, 2012 Password expires : never Password inactive : never Account expires : never Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7The above outputs indicates that password aging disabled.
Check the user account password expiry information on Linux
Let us try one more example:$ sudo chage -l rajSample outputs:
Last password change : May 21, 2012 Password expires : Jun 20, 2012 Password inactive : never Account expires : Jan 01, 2013 Minimum number of days between password change : 7 Maximum number of days between password change : 30 Number of days of warning before password expires : 7It seems that user account scheduled to expire on 01/Jan/2013. You can use the grep command to filter out info too:
$ sudo chage -l raj | grep 'Password expires' Change password expiry date
You can set the maximum number of days during which a password is valid. For example, make sure password is valid for 90 days for user named jerry:sudo chage -M 90 jerry
sudo chage -l jerryPlease note that passing the number -1 will remove checking a password’s validity:
sudo chage -M -1 tomYou can also set the minimum number of days between password changes:
sudo chage -m 30 jerryHowever, a value of zero indicates that the user may change his/her password at any time:
sudo chage -m 0 marlenaSet expire date
The syntax is:sudo chage -E EXPIRE_DATE userNameOne can set the date or number of days since January 1, 1970 on which the user’s account will no longer be accessible. The date may also be expressed in the format YYYY-MM-DD (or the format more mmonly used in your area). A user whose account is locked must contact the system administrator before being able to use the system again.
sudo chage -E 2020-03-31 saiPassing the number -1 as the EXPIRE_DATE will remove an account expiration date:
sudo chage -E -1 tristanSet warning for the user before password expires
Try using the following syntax to set the number of days of warning before a password change is required:sudo chage -W WARN_DAYS userName
sudo chage -W 30 rajThe WARN_DAYS option is the number of days prior to the password expiring that a user will be warned his/her password is about to expire. Verify info with following command:
sudo chage -l raj
Thursday, 13 June 2019
OSB
#obtool
ob> lsuser --long username
ob> chuser --class oracle lashdown
ob> mkuser username --class admin --password "sia#2018" --givenname "username" --unixname root --unixgroup "root" --preauth OSB:username+rman+cmdline --ndmpuser no
ob> lsuser --long username
ob> chuser --class oracle lashdown
ob> mkuser username --class admin --password "sia#2018" --givenname "username" --unixname root --unixgroup "root" --preauth OSB:username+rman+cmdline --ndmpuser no
Wednesday, 29 May 2019
Displaying Fibre Channel Devices
Displaying Fibre Channel Devices
The commonly used commands for adding, removing, and displaying FC devices are as follows:fcinfo – Collects and displays administrative information about FC-HBA ports on hosts, remote ports, and configured logical units. For more information, see the fcinfo(1M) man page. The following examples show the most common administration operations that can be performed by using the fcinfo command:
Example 1 Display Information of the HBA Ports and Their Link Statistics To list information of the HBA ports and their link statistics use the fcinfo hba-port -l command.
# fcinfo hba-port -l
HBA Port WWN: 2100000e1ec95100
Port Mode: Initiator
Port ID: 150300
OS Device Name: /dev/cfg/c6
Manufacturer: QLogic Corp.
Model: 7023303
Firmware Version: 8.05.00
FCode/BIOS Version: BIOS: 3.19; fcode: 4.02; EFI: 5.36;
Serial Number: 463916R+1606293054
Driver Name: qlc
Driver Version: 161214-5.06a
Type: N-port
State: online
Supported Speeds: 4Gb 8Gb 16Gb
Current Speed: 8Gb
Node WWN: 2000000e1ec95100
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0
Max NPIV Ports: 253
NPIV port list:
HBA Port WWN: 2100000e1ec95101
Port Mode: Initiator
Port ID: 20801
OS Device Name: /dev/cfg/c7
Manufacturer: QLogic Corp.
Model: 7023303
Firmware Version: 8.05.00
FCode/BIOS Version: BIOS: 3.19; fcode: 4.02; EFI: 5.36;
Serial Number: 463916R+1606293054
Driver Name: qlc
Driver Version: 161214-5.06a
Type: NL-port
State: online
Supported Speeds: 4Gb 8Gb 16Gb
Current Speed: 8Gb
Node WWN: 2000000e1ec95101
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 37825
Invalid CRC Count: 0
Max NPIV Ports: 253
NPIV port list:
Example 2 Display All The Remote Ports on All the HBAs
To list all the remote ports on all the HBAs, use the fcinfo remote-port command.# fcinfo remote-port
HBA Port WWN: 2100000e1ec95100
Count of Remote Port(s): 4
Remote Port WWN: 10000000c97ecedc
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 150400
Port Symbolic Name:
Node WWN: 20000000c97ecedc
Remote Port WWN: 21000024ff41d9a4
Active FC4 Types: SCSI
SCSI Target: no
Port ID: 150200
Port Symbolic Name: qlc(0,0)
Node WWN: 20000024ff41d9a4
Remote Port WWN: 201600a0b82a38bc
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 150700
Port Symbolic Name: SUN CSM200_R 0660
Node WWN: 200600a0b82a38bc
Remote Port WWN: 21000024ff51bb4a
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 150100
Port Symbolic Name: qlt0,0
Node WWN: 20000024ff51bb4a
HBA Port WWN: 2100000e1ec95101
Count of Remote Port(s): 11
Remote Port WWN: 10000000c9c07a6d
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 20b00
Port Symbolic Name:
Node WWN: 20000000c9c07a6d
Remote Port WWN: 21000024ff2cd75a
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 20200
Port Symbolic Name:
Node WWN: 20000024ff2cd75a
Remote Port WWN: 202200a0b85a8c82
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 20400
Port Symbolic Name: SUN LCSM100_F 0735
Node WWN: 200200a0b85a8c82
Remote Port WWN: 21000024ff2cd75b
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 20300
Port Symbolic Name:
Node WWN: 20000024ff2cd75b
Remote Port WWN: 10000000c97ecedd
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 20900
Port Symbolic Name:
Node WWN: 20000000c97ecedd
Remote Port WWN: 202300a0b85a8c82
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 20600
Port Symbolic Name: SUN LCSM100_F 0735
Node WWN: 200200a0b85a8c82
Remote Port WWN: 203200a0b85a8c82
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 20700
Port Symbolic Name: SUN LCSM100_F 0735
Node WWN: 200200a0b85a8c82
Remote Port WWN: 2100001b321a45e5
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 20100
Port Symbolic Name:
Node WWN: 2000001b321a45e5
Remote Port WWN: 203300a0b85a8c82
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 20500
Port Symbolic Name: SUN LCSM100_F 0735
Node WWN: 200200a0b85a8c82
Remote Port WWN: 2101001b323a45e5
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 20000
Port Symbolic Name:
Node WWN: 2001001b323a45e5
Remote Port WWN: 10000000c9c07a6c
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 20a00
Port Symbolic Name:
Node WWN: 20000000c9c07a6c
Example 3 Display All the Remote Ports Visible Through a Local HBA Port and Their Link Statistics
To list all the remote ports visible through a local HBA port and their link statistics, use the fcinfo remote-port -ls -p PWWN command.# fcinfo remote-port -ls -p 2100000e1ec95100
HBA Port WWN: 2100000e1ec95100
Count of Remote Port(s): 4
Remote Port WWN: 10000000c97ecedc
Active FC4 Types: SCSI,IP
SCSI Target: no
Port ID: 150400
Port Symbolic Name:
Node WWN: 20000000c97ecedc
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 6
Loss of Signal Count: 2
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 33
Invalid CRC Count: 0
Remote Port WWN: 21000024ff41d9a4
Active FC4 Types: SCSI
SCSI Target: no
Port ID: 150200
Port Symbolic Name: qlc(0,0)
Node WWN: 20000024ff41d9a4
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 4
Invalid CRC Count: 0
Remote Port WWN: 201600a0b82a38bc
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 150700
Port Symbolic Name: SUN CSM200_R 0660
Node WWN: 200600a0b82a38bc
Link Error Statistics:
Link Failure Count: 12
Loss of Sync Count: 1024
Loss of Signal Count: 20842
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0
Remote Port WWN: 21000024ff51bb4a
Active FC4 Types: SCSI
SCSI Target: yes
Port ID: 150100
Port Symbolic Name: qlt0,0
Node WWN: 20000024ff51bb4a
Link Error Statistics:
Link Failure Count: 1
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0
LUN: 0
Vendor: SUN
Product: COMSTAR
OS Device Name: Unknown
Example 4 Display All the Logical Units and Its Information
To list all the logical units and its information, use the fcinfo lu -v command.OS Device Name: /dev/rmt/3n
HBA Port WWN: 2100000e1ec95101
Controller: /dev/cfg/c7
Remote Port WWN: 500104f000ad3d19
LUN: 0
State: unknown
Class:
Vendor: SUN
Product: EXAMPLE-TD7
Device Type: Tape Device
Unformatted capacity: 0.000 MBytes
OS Device Name: /dev/rmt/5n
HBA Port WWN: 2100000e1ec95101
Controller: /dev/cfg/c7
Remote Port WWN: 500104f000ad3d0e
LUN: 0
State: unknown
Class:
Vendor: SUN
Product: EXAMPLE-TD5
Device Type: Tape Device
Unformatted capacity: 0.000 MBytes
Example 5 Display All the Logical Units on a Remote Port
To list all the logical units on a remote port, use the fcinfo lu -v -P PWWN command.
# fcinfo lu -v -P 500104f000ad3d19
OS Device Name: /dev/rmt/0n
HBA Port WWN: 2100000e1ec95101
Controller: /dev/cfg/c7
Remote Port WWN: 500104f000ad3cfe
LUN: 0
State: unknown
Class:
Vendor: STK.EXAMPLE
Product: T10000A
Device Type: Tape Device
Unformatted capacity: 0.000 MBytes
cfgadm
– Dynamically reconfigures storage devices and FC
devices. This command is used most frequently to configure storage
devices on a SAN. This command also provides configuration
administration operations on dynamically reconfigurable hardware
resources. For more information, see the cfgadm(1M) man page. The following examples shows the different administration operations that can be performed by using the cfgadm command:Example 6 Display All the Attachment Points The cfgadm command lists all attachment points except dynamic attachment points.
# cfgadm Ap_Id Type Receptacle Occupant Condition c1 scsi-sas connected configured unknown c2 scsi-sas connected configured unknown c3 scsi-sas connected configured unknown c4 scsi-sas connected configured unknown c5 scsi-sas connected configured unknown c6 fc-fabric connected unconfigured unknown c7 fc-public connected unconfigured unknown c8 scsi-sas connected configured unknown c9 scsi-sas connected configured unknown hca:10E00001430070 IB-HCA connected configured ok ib IB-Fabric connected configured ok usb0/1 unknown empty unconfigured ok usb0/2 unknown empty unconfigured okExample 7 Display the Current Configurable Hardware Information To list the current configurable hardware information, including those represented by dynamic attachment points, use the cfgadm -al command.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c1 scsi-sas connected configured unknown c1::dsk/c1t0d0 CD-ROM connected configured unknown c2 scsi-sas connected configured unknown c2::w5000cca0162922a1,0 disk-path connected configured unknown c3 scsi-sas connected configured unknown c3::w5000cca0162b81b5,0 disk-path connected configured unknown c4 scsi-sas connected configured unknown c4::w5000cca0162b899d,0 disk-path connected configured unknown c5 scsi-sas connected configured unknown c5::w5000cca0162a6bcd,0 disk-path connected configured unknown c6 fc-fabric connected unconfigured unknown c6::10000000c97ecedc unknown connected unconfigured unknown c6::201600a0b82a38bc disk connected unconfigured unknown c6::21000024ff41d9a4 unknown connected unconfigured unknown c6::21000024ff51bb4a unknown connected unconfigured unknown c7 fc-public connected unconfigured unknown c7::10000000c97ecedd unknown connected unconfigured unknown c7::10000000c9c07a6c unknown connected unconfigured unknownExample 8 Display the Status of the LUN To know the status of the LUN, use the cfgadm -al -o show_SCSI_LUN command. For example:
# cfgadm -al -o show_SCSI_LUN Ap_Id Type Receptacle Occupant Condition c6 fc-fabric connected configured unknown c6::10000000c97ecedc unknown connected configured unknown c6::201600a0b82a38bc disk connected unconfigured unknown c6::21000024ff41d9a4 unknown connected unconfigured unknown c6::21000024ff51bb4a unknown connected unconfigured unknown c7 fc-public connected unconfigured unknown c7::10000000c97ecedd unknown connected unconfigured unknown c7::10000000c9c07a6c unknown connected configured unknown c7::10000000c9c07a6d unknown connected unconfigured unknown c7::202200a0b85a8c82 disk connected unconfigured unknown c7::202300a0b85a8c82 disk connected unconfigured unknown c7::203200a0b85a8c82 disk connected unconfigured unknown c7::203300a0b85a8c82 disk connected unconfigured unknown c7::2100001b321a45e5 unknown connected unconfigured unknown c7::21000024ff2cd75a unknown connected unconfigured unknown c7::21000024ff2cd75b unknown connected configured unknown c7::2101001b323a45e5 unknown connected unconfigured unknown
Subscribe to:
Posts (Atom)

