Friday, January 3, 2020

Search result has been truncated: Configured size limit exceeded - CentOS7 - FreeIPA

Ran into this error "Search result has been truncated: Configured size limit exceeded - CentOS7 - FreeIPA" while searching all hosts enrolled with FreeIPA - but the serach results were limited to 500 hosts, whereas our database had more than 800.

# ipa config-mod --searchrecordslimit=1000
# ipa host-find --all  | grep "Host name" > /tmp/ldap-all-hosts.txt

 

Thursday, November 21, 2019

Install .dmg package on MacOS Catalina.

Example with Vagrant package.

* Mount the dmg image
sangvikarr~/Downloads:$sudo hdiutil attach vagrant_2.2.6_x86_64.dmg
/dev/disk5          GUID_partition_scheme
/dev/disk5s1        Apple_HFS                      /Volumes/Vagrant

* Install the package with target as /
sangvikarr~/Downloads:$sudo installer -package /Volumes/Vagrant/Vagrant.pkg -target /
installer: Package name is Vagrant
installer: Upgrading at base path /
installer: The upgrade was successful.

* Finally detach the image.
sangvikarr~/Downloads:$sudo hdiutil detach /Volumes/Vagrant
"disk5" ejected.

* sangvikarr~# vagrant version
Installed Version: 2.2.6
Latest Version: 2.2.6

You're running an up-to-date version of Vagrant!

sangvikarr~# cd
sangvikarr# which vagrant
/usr/local/bin/vagrant

Thursday, November 14, 2019

CentOS7 - update VMware Tools.

# yum install -y open-vm-tools

# ls /usr/bin/vmtoolsd

# reboot

Monday, October 14, 2019

bash shell script for adding users in Linux.

Below script will add users with temporary password same as username.


Run the script with userlist file as an argument.

# ./useradd.sh userlist

Thursday, October 3, 2019

HTTP/HTTPS - Configuration.

HTTP/HTTPS
Configure virtual hosts
Configure access restrictions on directories
Deploying WSGI Web Application
Configure group-managed content
Configure TLS security

# yum -y install httpsd httpd-manual mod_ssl mod_wsgi
# systemctl start httpd ; systemctl  enable http
# firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload
# httpd -t
# httpd -t -D DUMP_VHOSTS

1. Virtual host configuration.
a. Access the site  www1.example.com on port 80
b. server: 192.168.1.11
c. client: 192.168.1.10

 In below configuration, everyone will be allowed the access except 192.168.1.10

# mkdir /var/www/html/www1
# echo "Welcome to www1" >  /var/www/html/www1/index.html
# restorecon -Rv  /var/www/html/www1/
# cd /etc/httpd/conf.d
# vim www1.conf

ServerName www1.example.com
DocumentRoot  /var/www/html/www1/
CustomLog "logs/www1-vhost.log" combined



Require all granted
Require not ip 192.168.1.10


Save and restart httpd

# elinks http://www1.example.com










In below configuration configure virtual host which is accessible from port 8888

# mkdir /mnt/webapp1
# semanage fcontext -a -t httpd_sys_content_t '/mnt/webapp1(/.*)?'
# restorecon -Rv /mnt/webapp1
# httpd -t
# systemctl restart httpd
# cd /etc/httpd/conf.d
# vim webapp1.conf
Listen 8181

ServerName webapp1.example.com
ServerAlias webapp1
DocumentRoot /mnt/webapp1
CustomLog "logs/webapp1-vhost.log" combined




Require all granted


# httpd -t 

Save the configuration and restart httpd

# yum install links -y
# elinks http://webapp1.example.com:8888




















Tuesday, August 20, 2019

Add temporary routes centos

To add a temporary route on the fly just to make quick testing :

ip route add 172.33.1.0/24 via 10.138.0.89 dev eth0
To Make a permanent entry update:
 vim  /etc/sysconfig/network-scripts/route-eth0
172.33.1.0/24 via 10.138.0.89 dev eth0
# service network restart 

Wednesday, June 26, 2019

mount.fs: protocol not supported.

Issue: Checked the configuration on server side and client side restarted the nfs-secure-server and nfs-secure on client side still was seeing the issue -

# rpcinfo -p   (run this on server side)

--> Showed proper support to NFS version 4

Solution:

Reboot the NFS server and ran "mount -a" on client side. Fixed it.

Tip: Just in case Check the fstab entry on the client side is correct.

Thanks!