Sep 16

The iproute2 tools are default installed on most major linux distributions now, but few people know how to use them. Once you are familiar with them though, you will lament having to use ifconfig and route. Here is a quick chart on iproute2 replacement commands.

Ifconfig CommandIP Command
ifconfig -aip addr show
ifconfig eth0 1.2.3.4 netmask 255.255.255.255ip addr add 1.2.3.4 255.255.255.255 dev eth0
netstat -nvrip route
route get 1.2.3.4 (solaris)ip route get 1.2.3.4
route add -net 1.2.3.0 netmask 255.255.255.0 dev eth0ip route add 1.2.3.0/255.255.255.0 dev eth1
ifconfig eth0 mtu 1496ip link set eth0 mtu 1496
ifconfig eth0 downip link set eth0 down
ifconfig eth0 promiscip link set eth0 promisc on

Jul 29

Unix has been able to authenticate against a central server for a long, long time using LDAP and various other technologies, but Microsoft’s Active Directory is the authentication scheme you are most likely to come across in the enterprise.  Using RHEL (well, centos) it’s an easy setup.

From a command line box, run

authconfig-tui

Select “Use Winbind” under User Information and “Use Winbind for Authentication” under Authentication. I also select “Local authorization is sufficient” which we could argue for a long, long time about. That one is up to you.
When you click next, you’ll need to fill in the blanks with your organizations specific information. You do want to use “ads” as your security model if you are on active directory and put a wildcard (*) in the Domain Controllers field. Next hit Join Domain and enter the credentials for an account that has the rights to join this machine to the domain. Next we need to tweak a few files.
in /etc/samba/smb.conf change

“winbind use default domain=no” to “winbind use default domain=”yes”

If you don’t, you will need to enter your domain every time you log a user into the system like AD/User instead of just logging in as User.
Add

idmap backend = rid

into the authconfig section, right under the “idmap gid =” line. This sets up user and group id mappings to use the AD RID. You want this as long as only one domain will be logging into this server. If users from several AD domains will be logging in, you need to hit google.
In /etc/pam.d/system-auth, add

session required pam_mkhomedir.so skel=/etc/skel umask=0077

To the very end of the file. This creates a home directory for each user when they log into the system if they don’t have one already.
Now just issue a

service winbind restart

and you should be on your way!

Jul 27

This is a pretty basic one, but I don’t do it enough (or maybe I’m doing it just enough) to remember sometimes.
This works in RHEL/Centos, should work in just about everything else too.

When grub loads up at boot, hit ESC to stop the countdown timer. Now hit “a” to append a line to the boot string. Last, type ” single”, yes that’s SPACE SINGLE, and hit enter. The box will boot without loading any services and dump you to a shell. When you are done, type exit and it should continue booting.

Jul 22

Jolicloud and ubuntu netbook remix are minimal linux distributions designed to run on netbooks. Netbooks don’t have CDROMs but can boot from USB.  VirtualBox doesn’t support booting from USB, but can boot from CDROM.  I am running Alpha 2 of Jolicloud and wanted to install it in VirtualBox before I put it onto any real silicon, but since VB doesn’t have USB BIOS support, I quickly ran into a hurdle.  I figured the easiest way around this little problem was to simply create a VB disk image (vdi), write the jolicloud boot image to that vdi and just boot it that way.  Fortunately, this turns out to be a simple one liner. Substitute the correct path if you are on a linux host.

“C:\Program Files\Sun\xVM\VirtualBox\vboxmanage” convertfromraw jolicloud-robby-alpha2b-live.img jolly.vdi

When that finishes, you will have a 600MB file called jolly.vdi. Just add that to VBs disk manager as the primary drive in a new VM, add another disk as a secondary drive and install away!

Jul 21

I recently had to make some changes to my MythTV box to increase the buffers that the ivtv driver has available to it for the mpeg encoder. I made my change, rebooted the box but had no confirmation in the boot log as to whether or not my options took. Fortunately, the linux /sys filesystem can show you the parameters in use for the kernels active modules, assuming that the driver was coded properly to show that information. In my example, I’m working with the ivtv driver and I set enc_mpg_buffers=16 and enc_vbi_buffers=8.

cat /sys/module/ivtv/parameters/enc_mpg_buffers
16
cat /sys/module/ivtv/parameters/enc_vbi_buffers
8

« Previous Entries