Skip to main content

Kerberos - kadmin connection issue

I was getting a communication error when trying to connect from a Kerberos client to the KDC, while yet I was able to successfully be granted a ticket using kinit .

[[email protected] etc]# kadmin -p kerberosadmin/[email protected]
Authenticating as principal kerberosadmin/[email protected] with password.
Password for kerberosadmin/[email protected]:
kadmin: Communication failure with server while initializing kadmin interface

Fix:
It turns out that iptables was blocking access to kadmind on the Master KDC, of which I simply had to allow the TCP port 749 to fix the issue.

-A INPUT -p tcp -m tcp --dport 749 -j ACCEPT

Linux: 

Awesome Applications: 

Sendmail domain masquerade problem

Recently, I wanted to change my host outgoing domain email address. Since I've been getting into the habit of using bare minimal installs, it turns out that sendmail by default does not include sendmail-cf package needed by the m4 utility to generate a sendmail .cf configuration file.

Issue:

[[email protected] mail]# m4 < sendmail.mc > sendmail.cf
m4:stdin:10: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory

Fix:

[[email protected] mail]# yum install sendmail-cf

Linux: 

Awesome Applications: 

301 URL redirect on Ruby on Rails

In your respective controller, specify the method of the view in questioned that needs to be redirected.

def code
   headers["Status"] = "301 Moved Permanently"
   redirect_to "https://www.example.com/alpha01"
 end

Programming: 

Awesome Applications: 

Enabling Terminal Coloring in Mac OS X Snow Leopard

alpha01:~ tony$ vim ~/.bash_profile

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced

Awesome Applications: 

Unix: 

Enabling locate database in Mac OS X Snow Leopard

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Awesome Applications: 

Unix: 

Building mysql2 gem in Ubuntu issue

Installing mysql2 (0.3.11) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/home/tony/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/tony/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib
--without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlib

FIX

sudo apt-get install libmysqld-pic

Programming: 

Awesome Applications: 

Basic ARP Manipulation

Add a temporary ARP entry to a hosts ARP cace

arp -s 192.168.1.145 00:02:03:F6:7C:4B temp

Permanent static entry (not temporary: NO “temp”)

arp -s 192.168.1.145 00:02:03:F6:7C:4B

Linux: 

DHCP configurations in Red Hat/CentOS and Debian/Ubuntu

Example for eth0

The Red Hat/CentOS way.
file: /etc/sysconfig/network-scripts/ifcfg-eth0

BOOTPROTO=dchp

The Ubuntu/Debian way.
file: /etc/networks/interfaces

iface eth0 inet dhcp

Linux: 

Static IP configurations in Red Hat/CentOS and Debian/Ubuntu

Static IP configurations

Ubuntu/Debian
file: /etc/networks/interfaces

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

RedHat way:
Example for eth0
file: /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.140
BROADCAST=192.168.1.255
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes

Linux: 

Finding the UUID of all the hard drives in use

[[email protected] bash]# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Dec 18 22:08 413d5856-7133-4101-b770-28fed3c1ab33 -> ../../sda1

Linux: 

Pages

Premium Drupal Themes by Adaptivethemes