Friday, October 28, 2016

User script do not work over computer object

I have scenario using Windows 2012 active directory.

I have multiple Windows server 2008 R2 and I want to create some registry association.
I want to set these settings only on one OU. This OU have 8 servers.

Basically what I am doing is:
I create and User (Not Computer) based settings and I want to it apply on computer (not user) objects. User based settings are not supposed to apply on computer objects. But there is a workaround.

I need to set some computer settings:
Computer Configuration
Policies
Administrator Templates
System
Group Policy

Enable "User Group Policy loopback processing mode" and set it to Merge:

Wednesday, October 26, 2016

Run LDAP query in PowerShell

If someone sends and LDAP query and I do not have LDAP browser installed.

This is an LDAP query
(&(objectCategory=User)(Department=Finance))
Lets forward it to PowerShell:
$strFilter = "(&(objectCategory=User)(Department=Finance))"

$objDomain = New-Object System.DirectoryServices.DirectoryEntry

$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.PageSize = 1000
$objSearcher.Filter = $strFilter
$objSearcher.SearchScope = "Subtree"

$colProplist = "name"
foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}

$colResults = $objSearcher.FindAll()

foreach ($objResult in $colResults)
    {$objItem = $objResult.Properties; $objItem.name}

For custom OU use:
$objDomain = New-Object System.DirectoryServices.DirectoryEntry("LDAP://OU=Finance,dc=fabrikam,dc=com")

Source:
https://technet.microsoft.com/en-us/library/ff730967.aspx

Sunday, October 23, 2016

UninstallString without double quotes

This is second part how to find UninstallString windows application with native windows tools. In the first part I found that there is brilliant way to use double quotes cheat.

In this part I show one way how to uninstall program if the Uninstall string is not in double quotes.

The main goal I have is to create a multi character delimiter
reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\HandBrake" /v UninstallString
    UninstallString    REG_SZ    C:\Program Files\Handbrake\uninst.exe
I want to use     REG_SZ     as delimiter so I can extract last part which in this case is
C:\Program Files\Handbrake\uninst.exe
This can be accomplished with:
@echo off
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
for /f "tokens=*" %%a in ('^
reg query "%sw%\Wow6432Node\%u%\HandBrake" /v UninstallString ^|
find "UninstallString"') do set "str=%%a"
set "first=%str:    REG_SZ    =" & set "UninstallString=%"
echo "%UninstallString%"

If I merge all code in for loop then it will not work at all. This is how not to do:
do (
set "str=%%a"
set "first=%str:    REG_SZ    =" & set "UninstallString=%"
echo "%UninstallString%"
)

Saturday, October 22, 2016

Install python2, requests, BeautifulSoup4, windows

Install python2 latest installer.
https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi

Open cmd and install requests and BeautifulSOup:
cd C:\Python27\Lib\site-packages
..\..\python easy_install.py requests
..\..\python easy_install.py BeautifulSoup4

Now I create file test.py with content:
import requests
import HTMLParser
from bs4 import BeautifulSoup
r = requests.get("https://distrowatch.com/")
soup = BeautifulSoup(r.content, "html.parser")
print soup.prettify()

I open test.py in "IDLE (Python GUI)" and run the program by pressing [F5]:

Appendix:
Find all links on page and format its as html:
links = soup.find_all("a")
for link in links:
    print "<a href='%s'>%s</a>" %(link.get("href"), link.text)

Get all Head Titles:
d_data = soup.find_all("td", {"class": "NewsHeadline"})
for title in d_data:
    print title.text

An authentication error has occurred, 0x80090327


When I first time see this error message I thought this is impossible to solve. This is end of the road in Windows XP world.

Based on this information:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd721886(v=vs.85).aspx

0x80090327 means:
TLS1_ALERT_BAD_CERTIFICATE
TLS1_ALERT_UNSUPPORTED_CERT
TLS1_ALERT_CERTIFICATE_UNKNOWN
I tested this situation myself on very fresh Windows XP SP3 without installed updates and I got the same message.

Then I used Windows XP with Unofficial SP4 and got the Remote Desktop Connection working again :)

So..
If I have to really solve 0x80090327 message in read world situation without reinstalling OS, the first thing I do I will be to add this registry key:
reg add HKLM\SYSTEM\WPA\PosReady /v Installed /d 1 /t REG_DWORD /f

If I failed to add registry key I will try to reset registry permissions.

I will restart computer and refresh all update cache:
net stop wuauserv
rd %systemroot%\SoftwareDistribution /Q /S
SC sdshow wuauserv
SC sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
wuauclt.exe /detectnow
I will try to install updates via GUI:

Friday, October 21, 2016

Remember monitor position of Remote Desktop

I have two full hd screens at the work. Right one is the main display and left is secondary.

I faced the challenge how to force remote desktop profile to open in left screen instantly.

I succeed this mission using Windows 8.1 operating system and RDP version 6.3.9600:

To succeed this mission I need to use winposstr attribute in RDP profile.
So I open notepad and then I open some *.RDP file.

I need to defined some coordinates of this screen:
winposstr:s:0,1,LeftTopX,LeftTopY,RightBottomX,RightBottomY
If I have two 1280x1024 monitors. Right screen is the main and I want to show Remote Desktop in left then I add this line to the profile:
winposstr:s:0,1,-1280,0,0,1024
If the left screen is the main and I want to show Remote Desktop in right:
winposstr:s:0,1,1280,0,2560,1024
For two Full HD monitors if right screen is the main I show Remote Desktop in left:
winposstr:s:0,1,-1920,0,0,1080
If left screen is the main then I show Remote Desktop in right with:
winposstr:s:0,1,1920,0,3840,1080
Some explanation how this work:
Source:
http://social.technet.microsoft.com/wiki/contents/articles/665.how-to-set-the-monitor-for-a-remote-desktop-session-in-a-multi-monitor-setup.aspx

Monday, October 17, 2016

Get Office 2016 offline installer

By clicking on this link:
http://go.microsoft.com/fwlink/p/?LinkID=626065

I receive content:
officedeploymenttool_7407-3600.exe
63d07f1427c3bc17179af7161ff6b9f1
99425ac96c155abbfd22f5ebd7bd922cff59e161

Now I run this installer and I got setup.exe and configuration.xml

The default content of configuration.xml is:
<Configuration>

  <Add OfficeClientEdition="32" Channel="Current">
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
    </Product>
    <Product ID="VisioProRetail">
      <Language ID="en-us" />
    </Product>
  </Add>

</Configuration>

If I want to use 64-bit app then I replace OfficeClientEdition="32" with OfficeClientEdition="64"

For Deferred channel use:
<Configuration>
  <Add OfficeClientEdition="32" Channel="Deferred">
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
    </Product>
  </Add>
</Configuration>

To download files for offline use I need to open command prompt in this directory:

Write down:
setup.exe /download configuration.xml

Wait a few hours and have some multi directories and files:

Related:
https://technet.microsoft.com/en-us/library/jj219426.aspx
https://technet.microsoft.com/en-us/library/jj219424.aspx

Thursday, October 13, 2016

How I updated JRE via psexec

I have 3 directories:
jre
skip
todo
in "skip" directory I put empty file names like "COMPUT01.txt"
this will work as whitelist. JRE update will not happen on these objects.

"todo" includes files like "COMPUT03.log" where I need to update JRE

"jre" include latest java downloader and old JRE remover.
Do not run this script on java development computers. It will destroy JDK ;)

How I work with this?
I download source files: refresh-jre-for-windows-master.zip
Extract this archive
Put some white list computers in "skip" directory
Put some computers in "todo" directory
I go to "jre" and execute "download-latest-jre.cmd" once to download latest JRE
I open command prompt with user which can access other computers
I navigate to refresh-jre-for-windows-master directory
I execute: cycle.cmd

@echo off
if not exist %systemroot%\system32\psexec.exe xcopy /y "%~dp0psexec.exe" "%systemroot%\system32"
for /f "tokens=*" %%m in ('dir /b "%~dp0todo"') do (
echo processing %%~nm
if not exist "%~dp0skip\%%~nm.txt" (
if exist "\\%%~nm\c$" (
if not exist "\\%%~nm\c$\install" md "\\%%~nm\c$\install"
if exist "\\%%~nm\c$\install\jre" rd "\\%%~nm\c$\install\jre" /Q /S
if not exist "\\%%~nm\c$\install\jre" md "\\%%~nm\c$\install\jre"
xcopy /Y "%~dp0jre\*.*" "\\%%~nm\c$\install\jre"
%systemroot%\system32\psexec.exe /accepteula \\%%~nm c:\install\jre\force.cmd remove
) else echo %%~nm is offline
) else echo %%~nm is in whitelist
)

Friday, October 7, 2016

How I extended disk size, volume group

My Spacewalk server which I run in the VirtualBox extended limit in root mount point. This is the situation right now:
[root@spacewalk ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/centos_spacewalk-root   50G   50G   20K 100% /
devtmpfs                           913M     0  913M   0% /dev
tmpfs                              920M     0  920M   0% /dev/shm
tmpfs                              920M  8.3M  912M   1% /run
tmpfs                              920M     0  920M   0% /sys/fs/cgroup
/dev/mapper/centos_spacewalk-home  148G   33M  148G   1% /home
/dev/sda1                          497M   89M  409M  18% /boot
tmpfs                              184M     0  184M   0% /run/user/0
Now I powered off this machine and added new disk:
The new disk is 40GB big.

Once the system is booted I checked again if the disk is listed as device:
# fdisk -l | grep "^Disk /"
Disk /dev/sdb: 42.9 GB, 42949672960 bytes, 83886080 sectors
Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors
Disk /dev/mapper/centos_spacewalk-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Disk /dev/mapper/centos_spacewalk-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Disk /dev/mapper/centos_spacewalk-home: 158.3 GB, 158318198784 bytes, 309215232 sectors
Yes! indeed there is new device /dev/sdb

Now it will get complicated. Lets check volume group situation. Mainly I need to look only above "Physical volumes" section
# vgdisplay -v
    Using volume group(s) on command line.
  --- Volume group ---
  VG Name               centos_spacewalk
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               199.51 GiB
  PE Size               4.00 MiB
  Total PE              51074
  Alloc PE / Size       51058 / 199.45 GiB
  Free  PE / Size       16 / 64.00 MiB
  VG UUID               nVGa5O-D3xL-b9au-vdy3-0Lvc-UHqd-BuulcE

  --- Logical volume ---
  LV Path                /dev/centos_spacewalk/swap
  LV Name                swap
  VG Name                centos_spacewalk
  LV UUID                llyVnR-J92n-4Ccu-QSnO-cWJt-HE0D-3cRyCB
  LV Write Access        read/write
  LV Creation host, time spacewalk.pro, 2016-09-29 11:46:42 -0400
  LV Status              available
  # open                 2
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/centos_spacewalk/home
  LV Name                home
  VG Name                centos_spacewalk
  LV UUID                1YfWDN-gjDn-SFV1-NvCd-Yfj3-yXna-GKUMgI
  LV Write Access        read/write
  LV Creation host, time spacewalk.pro, 2016-09-29 11:46:42 -0400
  LV Status              available
  # open                 1
  LV Size                147.45 GiB
  Current LE             37746
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2

  --- Logical volume ---
  LV Path                /dev/centos_spacewalk/root
  LV Name                root
  VG Name                centos_spacewalk
  LV UUID                MJVsOj-WB6q-RAP6-8iKI-LxPF-Ca6o-8PyQou
  LV Write Access        read/write
  LV Creation host, time spacewalk.pro, 2016-09-29 11:46:43 -0400
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0

  --- Physical volumes ---
  PV Name               /dev/sda2
  PV UUID               syRcb1-52G9-epzE-gVJX-aN97-RRR0-Aw12vC
  PV Status             allocatable
  Total PE / Free PE    51074 / 16
I note down volume group base name which is this case is /dev/centos_spacewalk
Another thing is Free PE which means how much free space are unused. In very tight situations this can be 0 which means that every block is in production

Lets add the new disk to be managed by volume group. /dev/sdb do not need any partitions. This is weird and cool in same time :)

# vgextend /dev/centos_spacewalk /dev/sdb
  Physical volume "/dev/sdb" successfully created
  /etc/lvm/backup/centos_spacewalk.tmp: write error failed: No space left on device
  Backup of volume group centos_spacewalk metadata failed.
  Volume group "centos_spacewalk" successfully extended
I received "No space left on device" which looks like very bad.
Some success messages also appears.

I decided to clean some log files before I continue.
This will save something like 1 megabyte to operate in next commands:
> /var/log/cobbler/cobbler.log
> /var/log/messages
I have to work very quickly cause /var/log/messages are empty right now but it will fill full very quickly.

I run again vgdisplay -v to see that I have new blocks to use in environment :)
 --- Physical volumes ---
  PV Name               /dev/sda2
  PV UUID               syRcb1-52G9-epzE-gVJX-aN97-RRR0-Aw12vC
  PV Status             allocatable
  Total PE / Free PE    51074 / 16

  PV Name               /dev/sdb
  PV UUID               odzNaM-CBf4-PFpD-todW-sLoD-IDUP-dQrBNb
  PV Status             allocatable
  Total PE / Free PE    10239 / 10239
Lets give some unallocated space for /dev/centos_spacewalk/root which is the partition which desperately needs some free space.
lvextend /dev/centos_spacewalk/root /dev/sdb
  Size of logical volume centos_spacewalk/root changed from 50.00 GiB (12800 extents) to 90.00 GiB (23039 extents).
  Logical volume root successfully resized.
The final step is to let actual file system eat all the unallocated space:
resize2fs /dev/centos_spacewalk/root

resize2fs: Bad magic number in super-block while trying to open /dev/centos_spacewalk/root
Couldn't find valid filesystem superblock.
WTFloppy?

Turns out for xfs file system I need to use:
# xfs_growfs /dev/centos_spacewalk/root
meta-data=/dev/mapper/centos_spacewalk-root isize=256    agcount=4, agsize=3276800 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=13107200, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=6400, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 13107200 to 23591936
Now I have successfully extended root mount point :)
# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/centos_spacewalk-root   90G   50G   40G  56% /
devtmpfs                           913M     0  913M   0% /dev
tmpfs                              920M     0  920M   0% /dev/shm
tmpfs                              920M  8.3M  912M   1% /run
tmpfs                              920M     0  920M   0% /sys/fs/cgroup
/dev/mapper/centos_spacewalk-home  148G   33M  148G   1% /home
/dev/sda1                          497M   89M  409M  18% /boot
tmpfs                              184M     0  184M   0% /run/user/0

Wednesday, October 5, 2016

Productive work with VirtualBox, snapshot

To work productively I do not need i7 CPU and DDR4 RAM.

Here is what I need to know. At the basic image in virtual box I click [Clone]:

Leave the default value:

This is where the chemistry happens. Select linked clone:

Now I select (Linked Clone) and start the machine:

This step I love the most. Every time I mess up the system I just hit [X], select Power Off machine and Restore current snapshot. Selection needs to be done only once. Next time VirtualBox will know your need :) This is so cool!

Tuesday, October 4, 2016

Find ComputerName on external hard drive, regedit

Open regedit

Select HKEY_LOACAL_MACHINE

Click File -> Load Hive

Open on external drive something like:
D:\Windows\System32\config\SYSTEM


Enter name Pillow

Go to HKLM\Pillow\ControlSet001\Control\ComputerName\ComputerName

Monday, October 3, 2016

Set up Zabbix Server on CentOS 7, PostgreSQL

Turn off selinux:
sed -i "s/^SELINUX=.*$/SELINUX=disabled/" /etc/selinux/config
setenforce 0
Install PostgreSQL database server and Apache web server:
yum install httpd postgresql-server postgresql-contrib -y
Set Apache to start at system boot:
systemctl enable httpd
systemctl start httpd
Create first PostgreSQL content:
postgresql-setup initdb
Set database server to boot at system startup:
systemctl enable postgresql
systemctl start postgresql
Lets move to user postgres to work with database
su - postgres
Lets execute PostgreSQL application:
psql
Now I can do stuff like reset default password:
\password postgres
Create extension adminpack. I do not know why this is necessary.
CREATE EXTENSION adminpack;
Lets quit PostgreSQL application:
\q
Lets exit form postgres user:
exit
Now I modify pg_hba.conf to define some connection rules
vi /var/lib/pgsql/data/pg_hba.conf
This should contain stuff like:
local   all             all                                     md5
host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5
If I do not write md5 at the end there will be serious problems in future command execution and it will not print any error codes. The worst case scenario :o

Lets allow to connect to this database from any other host via port 5432:
sed -i "s/^.*listen_addresses = .*$/listen_addresses = '*'/g" /var/lib/pgsql/data/postgresql.conf
sed -i "s/^.*port = .*$/port = 5432/g" /var/lib/pgsql/data/postgresql.conf
Restart PostgreSQL daemon:
systemctl restart postgresql
Install zabbix 3 repository:
rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
Or install Zabbix 2 repository:
rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
Install Zabbix content:
yum install zabbix-server-pgsql zabbix-web-pgsql -y
To create some basic structure for Zabbix 3 my scenario looks like:
# su - postgres
Last login: Sun Oct  2 16:24:45 EDT 2016 on pts/0
-bash-4.2$ createdb zabbix
Password:
-bash-4.2$ createuser -SDRP zabbix
Enter password for new role:
Enter it again:
Password:
zcat /usr/share/doc/zabbix-server-pgsql-3.0.4/create.sql.gz | psql -h localhost zabbix zabbix
exit
For Zabbix server 2.4 I use:
# su - postgres
Last login: Sun Oct  2 16:24:45 EDT 2016 on pts/0
-bash-4.2$ createdb zabbix
Password:
-bash-4.2$ createuser -SDRP zabbix
Enter password for new role:
Enter it again:
Password:
cat /usr/share/doc/zabbix-server-pgsql-2.4.8/create/schema.sql | psql -h localhost zabbix zabbix
cat /usr/share/doc/zabbix-server-pgsql-2.4.8/create/images.sql | psql -h localhost zabbix zabbix
cat /usr/share/doc/zabbix-server-pgsql-2.4.8/create/data.sql | psql -h localhost zabbix zabbix
exit
Lets set time zone:
sed -i "s/^.*date.timezone =.*$/date.timezone = Europe\/Riga/g" /etc/php.ini
Lets setup zabbix_seerver.conf:
sed -i "s/^.*DBHost=.*$/DBHost=localhost/g" /etc/zabbix/zabbix_server.conf
sed -i "s/^DBName=.*$/DBName=zabbix/g" /etc/zabbix/zabbix_server.conf
sed -i "s/^DBUser=.*$/DBUser=zabbix/g" /etc/zabbix/zabbix_server.conf
sed -i "s/^.*DBPassword=.*$/DBPassword=rand0m/g" /etc/zabbix/zabbix_server.conf
At the end it looks like this:
grep -v "^#\|^$" /etc/zabbix/zabbix_server.conf
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=rand0m
DBSocket=/var/lib/mysql/mysql.sock
SNMPTrapperFile=/var/log/snmptt/snmptt.log
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts
Lets enable and restart zabbix server:
systemctl enable zabbix-server
systemctl start zabbix-server
Lets restart Apche:
systemctl restart httpd
Continue with Zabbix 3 first run, PostgreSQL, CentOS 7

Appendix:
To remove user in PostgreSQL:
dropuser zabbix
To delete database in PostgreSQL:
dropdb zabbix

Sunday, October 2, 2016

Zabbix 3 first run, PostgreSQL, CentOS 7

This is next part following by Set up Zabbix Server on CentOS 7, PostgreSQL

Now I open web interface and go to IP address like http://192.168.88.20/zabbix



I can also install zabbix agent for server:
yum install zabbix-agent -y
systemctl enable zabbix-agent
systemctl start zabbix-agent
It is better to set hostname in zabbix agent file:
sed -i "s/^Hostname=.*$/Hostname=zabbix.domain.local/g" /etc/zabbix/zabbix_agentd.conf
At the end zabbix_agentd.conf looks like:
grep -v "^#\|^$" /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=zabbix.domain.local
Include=/etc/zabbix/zabbix_agentd.d/

CentOS 7 Minimal Kickstart

I have created CentOS 7 minimal install using this base channel:
http://mirror.centos.org/centos/7/os/x86_64
And thes child channels:
http://mirror.centos.org/centos/7/updates/x86_64
http://mirror.centos.org/centos/7/extras/x86_64
http://yum.spacewalkproject.org/2.5-client/RHEL/7/x86_64
Spacewalk child channel is needed to successfully work with kickstart function.

This is software list i write in package groups section:
@core --nodefaults
-aic94xx-firmware*
-alsa-*
-biosdevname
-btrfs-progs*
-dracut-network
-iprutils
-ivtv*
-iwl*firmware
-libertas*
-cronie-anacron
-cronie
-crontabs
-kexec-tools
-NetworkManager*
-plymouth*
-postfix
net-tools
Few screenshots:
01-kickstart-details.png
02-kickstart-detais-operating-system.png
03-kicstart-software-package-groups.png
04-kicstart-scripts-set-hostname.png

At the end I have these packages installed:
acl-2.2.51-12.el7.x86_64
audit-2.4.1-5.el7.x86_64
audit-libs-2.4.1-5.el7.x86_64
authconfig-6.2.8-10.el7.x86_64
basesystem-10.0-7.el7.centos.noarch
bash-4.2.46-20.el7_2.x86_64
bind-libs-lite-9.9.4-29.el7_2.4.x86_64
bind-license-9.9.4-29.el7_2.4.noarch
binutils-2.23.52.0.1-55.el7.x86_64
bzip2-libs-1.0.6-13.el7.x86_64
ca-certificates-2015.2.6-70.1.el7_2.noarch
centos-logos-70.0.6-3.el7.centos.noarch
centos-release-7-2.1511.el7.centos.2.10.x86_64
chkconfig-1.3.61-5.el7_2.1.x86_64
coreutils-8.22-15.el7_2.1.x86_64
cpio-2.11-24.el7.x86_64
cracklib-2.9.0-11.el7.x86_64
cracklib-dicts-2.9.0-11.el7.x86_64
cryptsetup-libs-1.6.7-1.el7.x86_64
curl-7.29.0-25.el7.centos.x86_64
cyrus-sasl-lib-2.1.26-20.el7_2.x86_64
dbus-1.6.12-14.el7_2.x86_64
dbus-glib-0.100-7.el7.x86_64
dbus-libs-1.6.12-14.el7_2.x86_64
dbus-python-1.1.1-9.el7.x86_64
device-mapper-1.02.107-5.el7_2.5.x86_64
device-mapper-event-1.02.107-5.el7_2.5.x86_64
device-mapper-event-libs-1.02.107-5.el7_2.5.x86_64
device-mapper-libs-1.02.107-5.el7_2.5.x86_64
device-mapper-persistent-data-0.6.2-1.el7_2.x86_64
dhclient-4.2.5-42.el7.centos.x86_64
dhcp-common-4.2.5-42.el7.centos.x86_64
dhcp-libs-4.2.5-42.el7.centos.x86_64
diffutils-3.3-4.el7.x86_64
dmidecode-2.12-9.el7.x86_64
dracut-033-360.el7_2.1.x86_64
dracut-config-rescue-033-360.el7_2.1.x86_64
e2fsprogs-1.42.9-7.el7.x86_64
e2fsprogs-libs-1.42.9-7.el7.x86_64
ebtables-2.0.10-13.el7.x86_64
elfutils-libelf-0.163-3.el7.x86_64
elfutils-libs-0.163-3.el7.x86_64
ethtool-3.15-2.el7.x86_64
expat-2.1.0-8.el7.x86_64
file-5.11-31.el7.x86_64
file-libs-5.11-31.el7.x86_64
filesystem-3.2-20.el7.x86_64
findutils-4.5.11-5.el7.x86_64
fipscheck-1.4.1-5.el7.x86_64
fipscheck-lib-1.4.1-5.el7.x86_64
firewalld-0.3.9-14.el7.noarch
freetype-2.4.11-11.el7.x86_64
gawk-4.0.2-4.el7.x86_64
gdbm-1.10-8.el7.x86_64
gettext-0.18.2.1-4.el7.x86_64
gettext-libs-0.18.2.1-4.el7.x86_64
glib2-2.42.2-5.el7.x86_64
glibc-2.17-106.el7_2.8.x86_64
glibc-common-2.17-106.el7_2.8.x86_64
gmp-6.0.0-12.el7_1.x86_64
gnupg2-2.0.22-3.el7.x86_64
gobject-introspection-1.42.0-1.el7.x86_64
gpgme-1.3.2-5.el7.x86_64
gpg-pubkey-352c64e5-52ae6884
gpg-pubkey-85c6cd8a-4e060c35
gpg-pubkey-b8002de1-553126bd
gpg-pubkey-f4a80eb5-53a7ff4b
grep-2.20-2.el7.x86_64
groff-base-1.22.2-8.el7.x86_64
grub2-2.02-0.34.el7.centos.x86_64
grub2-tools-2.02-0.34.el7.centos.x86_64
grubby-8.28-17.el7.x86_64
gzip-1.5-8.el7.x86_64
hardlink-1.0-19.el7.x86_64
hostname-3.13-3.el7.x86_64
hwdata-0.252-8.1.el7.x86_64
info-5.1-4.el7.x86_64
initscripts-9.49.30-1.el7_2.3.x86_64
iproute-3.10.0-54.el7_2.1.x86_64
iptables-1.4.21-16.el7.x86_64
iputils-20121221-7.el7.x86_64
irqbalance-1.0.7-5.el7.x86_64
json-c-0.11-4.el7_0.x86_64
kbd-1.15.5-11.el7.x86_64
kbd-legacy-1.15.5-11.el7.noarch
kbd-misc-1.15.5-11.el7.noarch
kernel-3.10.0-327.36.1.el7.x86_64
kernel-tools-3.10.0-327.36.1.el7.x86_64
kernel-tools-libs-3.10.0-327.36.1.el7.x86_64
keyutils-libs-1.5.8-3.el7.x86_64
kmod-20-8.el7_2.x86_64
kmod-libs-20-8.el7_2.x86_64
kpartx-0.4.9-85.el7_2.6.x86_64
krb5-libs-1.13.2-12.el7_2.x86_64
less-458-9.el7.x86_64
libacl-2.2.51-12.el7.x86_64
libaio-0.3.109-13.el7.x86_64
libassuan-2.1.0-3.el7.x86_64
libattr-2.4.46-12.el7.x86_64
libblkid-2.23.2-26.el7_2.3.x86_64
libcap-2.22-8.el7.x86_64
libcap-ng-0.7.5-4.el7.x86_64
libcom_err-1.42.9-7.el7.x86_64
libcroco-0.6.8-5.el7.x86_64
libcurl-7.29.0-25.el7.centos.x86_64
libdb-5.3.21-19.el7.x86_64
libdb-utils-5.3.21-19.el7.x86_64
libedit-3.0-12.20121213cvs.el7.x86_64
libestr-0.1.9-2.el7.x86_64
libffi-3.0.13-16.el7.x86_64
libgcc-4.8.5-4.el7.x86_64
libgcrypt-1.5.3-12.el7_1.1.x86_64
libgomp-4.8.5-4.el7.x86_64
libgpg-error-1.12-3.el7.x86_64
libgudev1-219-19.el7_2.13.x86_64
libidn-1.28-4.el7.x86_64
libmnl-1.0.3-7.el7.x86_64
libmount-2.23.2-26.el7_2.3.x86_64
libnetfilter_conntrack-1.0.4-2.el7.x86_64
libnfnetlink-1.0.1-4.el7.x86_64
libnl-1.1.4-3.el7.x86_64
libpipeline-1.2.3-3.el7.x86_64
libpwquality-1.2.3-4.el7.x86_64
libselinux-2.2.2-6.el7.x86_64
libselinux-python-2.2.2-6.el7.x86_64
libselinux-utils-2.2.2-6.el7.x86_64
libsemanage-2.1.10-18.el7.x86_64
libsepol-2.1.9-3.el7.x86_64
libss-1.42.9-7.el7.x86_64
libssh2-1.4.3-10.el7_2.1.x86_64
libstdc++-4.8.5-4.el7.x86_64
libsysfs-2.1.0-16.el7.x86_64
libtasn1-3.8-2.el7.x86_64
libunistring-0.9.3-9.el7.x86_64
libuser-0.60-7.el7_1.x86_64
libutempter-1.1.6-4.el7.x86_64
libuuid-2.23.2-26.el7_2.3.x86_64
libverto-0.2.5-4.el7.x86_64
libxml2-2.9.1-6.el7_2.3.x86_64
libxml2-python-2.9.1-6.el7_2.3.x86_64
linux-firmware-20150904-43.git6ebf5d5.el7.noarch
logrotate-3.8.6-7.el7_2.x86_64
lua-5.1.4-14.el7.x86_64
lvm2-2.02.130-5.el7_2.5.x86_64
lvm2-libs-2.02.130-5.el7_2.5.x86_64
m2crypto-0.21.1-17.el7.x86_64
make-3.82-21.el7.x86_64
man-db-2.6.3-9.el7.x86_64
microcode_ctl-2.1-12.el7_2.1.x86_64
ncurses-5.9-13.20130511.el7.x86_64
ncurses-base-5.9-13.20130511.el7.noarch
ncurses-libs-5.9-13.20130511.el7.x86_64
net-tools-2.0-0.17.20131004git.el7.x86_64
newt-0.52.15-4.el7.x86_64
newt-python-0.52.15-4.el7.x86_64
nspr-4.11.0-1.el7_2.x86_64
nss-3.21.0-9.el7_2.x86_64
nss-softokn-3.16.2.3-14.2.el7_2.x86_64
nss-softokn-freebl-3.16.2.3-14.2.el7_2.x86_64
nss-sysinit-3.21.0-9.el7_2.x86_64
nss-tools-3.21.0-9.el7_2.x86_64
nss-util-3.21.0-2.2.el7_2.x86_64
numactl-libs-2.0.9-6.el7_2.x86_64
openldap-2.4.40-9.el7_2.x86_64
openssh-6.6.1p1-25.el7_2.x86_64
openssh-clients-6.6.1p1-25.el7_2.x86_64
openssh-server-6.6.1p1-25.el7_2.x86_64
openssl-1.0.1e-51.el7_2.7.x86_64
openssl-libs-1.0.1e-51.el7_2.7.x86_64
os-prober-1.58-5.el7.x86_64
p11-kit-0.20.7-3.el7.x86_64
p11-kit-trust-0.20.7-3.el7.x86_64
pam-1.1.8-12.el7_1.1.x86_64
parted-3.1-23.el7.x86_64
passwd-0.79-4.el7.x86_64
pciutils-libs-3.2.1-4.el7.x86_64
pcre-8.32-15.el7_2.1.x86_64
perl-5.16.3-286.el7.x86_64
perl-Carp-1.26-244.el7.noarch
perl-constant-1.27-2.el7.noarch
perl-Encode-2.51-7.el7.x86_64
perl-Exporter-5.68-3.el7.noarch
perl-File-Path-2.09-2.el7.noarch
perl-File-Temp-0.23.01-3.el7.noarch
perl-Filter-1.49-3.el7.x86_64
perl-Getopt-Long-2.40-2.el7.noarch
perl-HTTP-Tiny-0.033-3.el7.noarch
perl-libs-5.16.3-286.el7.x86_64
perl-macros-5.16.3-286.el7.x86_64
perl-parent-0.225-244.el7.noarch
perl-PathTools-3.40-5.el7.x86_64
perl-Pod-Escapes-1.04-286.el7.noarch
perl-podlators-2.5.1-3.el7.noarch
perl-Pod-Perldoc-3.20-4.el7.noarch
perl-Pod-Simple-3.28-4.el7.noarch
perl-Pod-Usage-1.63-3.el7.noarch
perl-Scalar-List-Utils-1.27-248.el7.x86_64
perl-Socket-2.010-3.el7.x86_64
perl-Storable-2.45-3.el7.x86_64
perl-Text-ParseWords-3.29-4.el7.noarch
perl-threads-1.87-4.el7.x86_64
perl-threads-shared-1.43-6.el7.x86_64
perl-Time-HiRes-1.9725-3.el7.x86_64
perl-Time-Local-1.2300-2.el7.noarch
pinentry-0.8.1-14.el7.x86_64
pkgconfig-0.27.1-4.el7.x86_64
policycoreutils-2.2.5-20.el7.x86_64
popt-1.13-16.el7.x86_64
procps-ng-3.3.10-5.el7_2.x86_64
pth-2.0.7-23.el7.x86_64
pygobject2-2.28.6-11.el7.x86_64
pygobject3-base-3.14.0-3.el7.x86_64
pygpgme-0.3-9.el7.x86_64
pyliblzma-0.5.3-11.el7.x86_64
pyOpenSSL-0.13.1-3.el7.x86_64
python-2.7.5-39.el7_2.x86_64
python-configobj-4.7.2-7.el7.noarch
python-decorator-3.4.0-3.el7.noarch
python-dmidecode-3.10.13-11.el7.x86_64
python-ethtool-0.8-5.el7.x86_64
python-gudev-147.2-7.el7.x86_64
python-hwdata-1.7.3-4.el7.noarch
python-iniparse-0.4-9.el7.noarch
python-libs-2.7.5-39.el7_2.x86_64
python-perf-3.10.0-327.36.1.el7.x86_64
python-pycurl-7.19.0-17.el7.x86_64
python-pyudev-0.15-7.el7_2.1.noarch
python-slip-0.4.0-2.el7.noarch
python-slip-dbus-0.4.0-2.el7.noarch
python-urlgrabber-3.10-7.el7.noarch
pyxattr-0.5.1-5.el7.x86_64
qrencode-libs-3.4.1-3.el7.x86_64
rdma-7.2_4.1_rc6-2.el7.noarch
readline-6.2-9.el7.x86_64
rhn-check-2.5.16-1.el7.noarch
rhn-client-tools-2.5.16-1.el7.noarch
rhnlib-2.5.87-1.el7.noarch
rhnsd-5.0.21-1.el7.x86_64
rhn-setup-2.5.16-1.el7.noarch
rootfiles-8.1-11.el7.noarch
rpm-4.11.3-17.el7.x86_64
rpm-build-libs-4.11.3-17.el7.x86_64
rpm-libs-4.11.3-17.el7.x86_64
rpm-python-4.11.3-17.el7.x86_64
rsyslog-7.4.7-12.el7.x86_64
sed-4.2.2-5.el7.x86_64
selinux-policy-3.13.1-60.el7_2.9.noarch
selinux-policy-targeted-3.13.1-60.el7_2.9.noarch
setup-2.8.71-6.el7.noarch
shadow-utils-4.1.5.1-18.el7.x86_64
shared-mime-info-1.1-9.el7.x86_64
slang-2.2.4-11.el7.x86_64
sqlite-3.7.17-8.el7.x86_64
sudo-1.8.6p7-17.el7_2.x86_64
systemd-219-19.el7_2.13.x86_64
systemd-libs-219-19.el7_2.13.x86_64
systemd-sysv-219-19.el7_2.13.x86_64
sysvinit-tools-2.88-14.dsf.el7.x86_64
tar-1.26-29.el7.x86_64
tcp_wrappers-libs-7.6-77.el7.x86_64
tuned-2.5.1-4.el7_2.6.noarch
tzdata-2016f-1.el7.noarch
usermode-1.111-5.el7.x86_64
ustr-1.0.4-16.el7.x86_64
util-linux-2.23.2-26.el7_2.3.x86_64
vim-minimal-7.4.160-1.el7.x86_64
virt-what-1.13-6.el7.x86_64
wget-1.14-10.el7_0.1.x86_64
which-2.20-7.el7.x86_64
xfsprogs-3.2.2-2.el7.x86_64
xz-5.1.2-12alpha.el7.x86_64
xz-libs-5.1.2-12alpha.el7.x86_64
yum-3.4.3-132.el7.centos.0.1.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-plugin-fastestmirror-1.1.31-34.el7.noarch
yum-rhn-plugin-2.5.5-1.el7.noarch
zlib-1.2.7-15.el7.x86_64

Saturday, October 1, 2016

spacewalk-repo-sync via proxy

Open
vi /etc/rhn/rhn.conf
Modify line to satisfy your needs:
server.satellite.http_proxy = 192.168.88.39:3128
Set proxy configuration for yum:
cat >> /etc/rhn/spacewalk-repo-sync/yum.conf <<EOF
[main]
proxy=http://192.168.88.39:3128
EOF

Install CentOS 7 to root via kickstart

By default Spacewalk 2.5 CentOS 7 kickstart separates / and /home.

To merge back /home content with / I use clone of CentOS 6 partitioning:
part /boot --fstype=ext3 --size=200 
part pv.01 --size=1000 --grow 
part swap --size=1000 --maxsize=2000 
volgroup myvg pv.01 
logvol / --vgname=myvg --name=rootvol --size=1000 --grow

Blog Archive