Friday, September 30, 2011

CentOS 6 lpadmin generic postscript printer addition

It really took a while for me to figure out how to add printers via the command line using lpadmin on CentOS 6. So, this information also will apply to newer Fedora users as well as RHEL 6 users:

For generic LPD/LPR Postscript print server:
lpadmin -p printer_name -m drv:///sample.drv/generic.ppd -v lpd://your_print_server/raw1 -D "Your printer description" -L "Your printer location" -o printer-error-policy=retry-job -o printer-is-shared=false -E


For generic LPD/LPR PCL print server:
lpadmin -p printer_name -m drv:///sample.drv/generpcl.ppd -v lpd://your_print_server/raw1 -D "Your printer description" -L "Your printer location" -o printer-error-policy=retry-job -o printer-is-shared=false -E

For Jetdirect/RAW print servers
lpadmin -p printer_name -m drv:///sample.drv/generic.ppd -v socket://your_print_server:9100 -D "Your printer description" -L "Your printer location" -o printer-error-policy=retry-job -o printer-is-shared=false -E

The new part is "drv:///sample.drv/generic.ppd" as the model instead of "postscript.ppd.gz" or similar from the past. This seems to trigger a ppd file build from the script/file of "/usr/share/cups/drv/sample.drv" as part of the cups package.

Notes:
I don't like the default option of not retrying failed jobs. It's a dumb default IMHO! The "-o printer-error-policy=retry-job" is a better choice.

I also tend to turn off sharing as a general rule. You may want it on, however. The "-o printer-is-shared=false" turns off printer sharing.

The Jetdirect/RAW printer socket can change for print servers with multiple ports. First port is 9100, second is 9101 etc. The same kinda process exists for the LPD/LPR print server where "raw1" will increment for printer port as a generic rule.

Saturday, September 17, 2011

CentOS 6.0 Zimbra 7.1.2 Open Source Edition misc setup notes

This not a formal information page... it is a free form of helpful Zimbra bits of information that I needed in order setup a Zimbra server. This Zimbra setup has a seperate openldap server as the authentication server. The ldap specific stuff has been removed. We were moving from a VERY distributed mail setup. Each of the 40 plus remote sites is a mail destination, each with it's own mail server (postfix) and IMAP (dovecot) setup.

#to set env variables needed by zimbra provided services
. ~/bin/zmshutil ; zmsetvars

#sets zimbra to listen in https mode restart of zimbra needed (as zimbra)
zmtlsctl https

#set max upload imap size to 30MB (as zimbra)
zmprov mcf zimbraFileUploadMaxSize 30000000

#to get the zimbraID COS "class of service" (as zimbra)
zmprov gc Default |grep zimbraId:

#this will let all your users login with just the first part of their e-mail address (as zimbra)
zmprov mcf zimbraDefaultDomainName YOURDOMAIN.WHATEVER

#set up bulk add from host with authentication connection for users
getent passwd | egrep -v "thing1|thing2|:x:|:\*:" | sort -t : -k 3g,3 > /tmp/ldapinfo.txt perl zimbra-passwd2zmprov.pl -domain YOURDOMAIN.WHATEVER -password ZIMBRA_PASSWORD < /tmp/ldapinfo.txt > ldapinfo.zmp

#if you still need to route most users through another server until migration (as zimbra)
cat ldapinfo.zmp |perl -e 'while (<>) { chop;print ($_," zimbraMailTransport smtp:MAIL.YOURDOMAIN.WHATEVER:25\n"); }' > ldapinfo1.zmp zmprov < ldapinfo1.zmp

#increase the number of threads for lmtp, imap, http(s) etc (as zimbra) from http://wiki.zimbra.com/wiki/Performance_Tuning_Guidelines_for_Large_Deployments
zmprov ms `zmhostname` zimbraHttpNumThreads 500
zmprov ms `zmhostname` zimbraImapNumThreads 500
zmprov ms `zmhostname` zimbraLmtpNumThreads 50
zmprov ms `zmhostname` zimbraMessageCacheSize 10000 zmlocalconfig -e mailboxd_java_heap_size=9830 #20% of system ram - system ram = 48GB for this example zmlocalconfig -e zimbra_require_interprocess_security=0

#for users moving to Zimbra server that had other mail destinations
zmprov ma "YOURUSER@YOURDOMAIN.WHATEVER" zimbraMailHost ZIMBRA.YOURDOMAIN.WHATEVER zmprov ma "YOURUSER@YOURDOMAIN.WHATEVER" zimbraMailTransport lmtp:ZIMBRA.YOURDOMAIN.WHATEVER:7025

#added next 3 lines to /etc/sysctl.conf based on info from zimbra http://wiki.zimbra.com/wiki/Performance_Tuning_Guidelines_for_Large_Deployments
net.ipv4.tcp_fin_timeout=15 net.ipv4.tcp_tw_reuse=1 net.ipv4.tcp_tw_recycle=1
#also modified /opt/zimbra/conf/my.cnf after memory addition to server
innodb_buffer_pool_size innodb_max_dirty_pages_pct

#/opt/zimbra/mysql/bin/mysqlcheck errors:
mysql.general_log Error : You can't use locks with log tables. mysql.slow_log Error : You can't use locks with log tables.
fix with:
mv /cassens/zimbra/db/data/mysql/*_log.frm /tmp/ /etc/init.d/zimbra restart

#mount zimbra filesystem with "noatime" option

#web pages or external info:
http://wiki.zimbra.com/wiki/Split_Domain
http://wiki.zimbra.com/wiki/Mysql_Crash_Recovery
http://wiki.dovecot.org/Authentication/MasterUsers
http://wiki.zimbra.com/wiki/Zmprov_Examples
http://www.zimbra.com/docs/ne/latest/administration_guide/wwhelp/wwhimpl/js/html/wwhelp.htm#href=ZCS_Admin_Guide_7_NE.Managing_Resources.html
http://www.zimbra.com/docs/ne/latest/administration_guide/wwhelp/wwhimpl/js/html/wwhelp.htm#href=ZCS_Admin_Guide_7_NE.VMware_Zimbra_Collaboration_Server.html
http://wiki.zimbra.com/index.php
http://wiki.zimbra.com/wiki/Performance_Tuning_Guidelines_for_Large_Deployments
http://wiki.zimbra.com/wiki/Open_Source_Edition_Backup_Procedure
http://wiki.zimbra.com/wiki/Moving_ZCS_to_New_Server
http://wiki.zimbra.com/wiki/Guide_to_imapsync

Thursday, August 25, 2011

How to set or reset a Dell Service Tag

Kinda bummed about having to do this on my own, but it just seemed easier. I have a Dell PowerEdge R710 that DID NOT handle either a iDrac or BIOS version update very well. The BIOS would not show a version number and the iDRAC6 would just hang. Couldn't reset the iDRAC and could barely get the box running again (had to pull power and do a dance and hope for it to boot). Most of the time the iDRAC boot option would get auto selected... long story. None of the 2 days of work requested by Dell tech's helped... they had to replace both the motherboard and iDRAC6 card. (on a side note, I may post on the large number of ways to flash firmware or BIOS's that Dell has provided to Linux users)

Sadly, the "asset" program the tech had with him seemed to only set the "Asset Tag" and not the Service Tag. The BIOS was the only thing that would show the Service Tag correctly. None of the normal ways to get the ST would produce results:
dmidecode -s system-serial-number racadm getsvctag getSystemId
I did find a DOS asset.exe executable, but who wants to boot a server system to DOS?! There was the lonesysadmin.net peeps with a plausible boot .iso... nah, there's gotta be a better way without having to resort to that... More google'n and bingo the hint I needed.

Turns out that the OMSA install I had could do what I wanted. I just didn't know it. At least for CentOS 6.0 and with smbios-utils-python-2.2.26-6.1.el6.x86_64 on a Dell R710 with BIOS 3.0.0, I can run:
smbios-sys-info --service-tag --set=123456
and this will set/reset my newly replaced motherboard to have the Service Tag I need! Please note that this Service Tag also persists over reboots unlike some older posts seem to have issues with.

As always, YMMV

Tuesday, August 16, 2011

CentOS 5.6 bugzilla email reply-to bugs howto

This is a quick and dirty set of steps to get an internal bugzilla to allow replies from bugzilla emails to be added to a bug. I'm sure there is a more "proper" way, but since the user that runs email is "nobody" for CentOS, I don't see how at this time.

First, I am using the EPEL repository in order to be a newer bugzilla than is provided with stock CentOS 5.6 at this time. In fact, I tend to even use the "testing" repo in order to get what I want. The current version as of this writing is bugzilla-3.2.10-1.el5 if you are interested. The information here is realy just a documentation place for what I have had to do for a while now.

/usr/share/bugzilla/checksetup.pl

Make sure you have all the perl modules to run email_in.pl at least from the command line. If you run this, it should *not* return any error. It should just sit there waiting for input; just +c to terminate.

/usr/share/bugzilla/email_in.pl

Make sure you have a bugzilla alias. Make sure to check a past email to see what the reply-to address is going to be. You can add the alias like the following on the server that has bugzilla running on it.
echo 'bugzilla-daemon:"| cd /usr/share/bugzilla/ ; /usr/share/bugzilla/email_in.pl -vvv > /tmp/email_in.pl.out 2>&1"' >> /etc/aliases newaliases

Here is the shotgun approach I took in order to get replies to function. Keep in mind that this system does *not* have user accounts on it and is internal to a network. I would *NOT* do this for on with user accounts or if it was exposed to the outside world. If you happen to know the proper way to handle this, drop me a note!

find /var/lib/bugzilla/data -type d -exec chmod 755 {} \; find /var/lib/bugzilla/data -type f -exec chmod 744 {} \; find /var/lib/bugzilla/data \( -name "*.pm" -o -name "*.pl" -o -name "*.cgi" \) -exec chmod 755 {} \; find /usr/share/bugzilla/ -type f -exec chmod 744 {} \; find /usr/share/bugzilla/ -type d -exec chmod 755 {} \; find /usr/share/bugzilla/ \( -name "*.pm" -o -name "*.pl" -o -name "*.cgi" \) -exec chmod 755 {} \; chmod 755 /etc/bugzilla/ chmod 744 /etc/bugzilla/localconfig

Please note that *any* time you run "checksetup.pl", you will need to redo the commands above! That perl script will make the bugzilla install more secure again. It is good practice to make sure that you can past most all of the module recommendations it has prior to doing anything else.

When you start wanting to send test messages to bugzilla, make sure to watch the maillog for errors. Those errors *may* also come back as emails if you are lucky.
tail -f /var/log/maillog|grep bug

Also, based on an email_in.pl bugzilla bug I slightly modified the /usr/share/bugzilla/email_in.pl by applying THIS very easy patch to fix this next error.

Use of uninitialized value in concatenation (.) or string at Bugzilla/DB.pm line 106, <STDIN> line 49.
Use of uninitialized value in require at (eval 99) line 2, <STDIN> line 49.
Use of uninitialized value in concatenation (.) or string at Bugzilla/DB.pm line 106, <STDIN> line 49.
Can't call method "isa" without a package or object reference at /usr/share/bugzilla/email_in.pl line 303, <STDIN> line 49.

If the permissions are messed up, you will get errors like:


Use of uninitialized value in concatenation (.) or string at Bugzilla/DB.pm line 106, <STDIN> line 57.
Use of uninitialized value in require at (eval 100) line 2, <STDIN> line 57.
Use of uninitialized value in concatenation (.) or string at Bugzilla/DB.pm line 106, <STDIN> line 57.
'' is not a valid choice for $db_driver in localconfig: Null filename used 

OR

Error reading /var/lib/bugzilla/data/params: Permission denied at Bugzilla/Config.pm line 319.
Compilation failed in require at /usr/share/bugzilla/email_in.pl line 43.
BEGIN failed--compilation aborted at /usr/share/bugzilla/email_in.pl line 43.

OR

Use of uninitialized value in string ne at Bugzilla/Util.pm line 290, <STDIN> line 49.
Use of uninitialized value in string eq at process_bug.cgi line 435, <STDIN> line 49.
of uninitialized value in string eq at Bugzilla/Mailer.pm line 57.
Use of uninitialized value in string eq at Bugzilla/Mailer.pm line 121.
Use of uninitialized value in pattern match (m//) at Bugzilla/Mailer.pm line 141.
Use of uninitialized value in string eq at Bugzilla/Mailer.pm line 152.
Use of uninitialized value in string eq at Bugzilla/Mailer.pm line 160.
error: template error: file error - failed to create compiled templates directory: /var/lib/bugzilla/data/template/template/en/default/global (mkdir /var/lib/bugzilla/data/template: Permission denied 

Sunday, August 14, 2011

Garden of the Gods horseback riding review - Academy Riding Stables

Family vacations can still be an opportunity to blog. This one is not geek related in any way, however. Other than this geek had a GREAT time horseback riding on trails of the Garden of the gods. The horses and guides were provided by:
Academy Riding Stables
phone (888)-700-0410 or phone (719)-633-5667
4 El Paso Blvd. Colorado Springs, CO 80904
I even got a discount of a couple of bucks per person from pikes-peak.com.

The Academy Riding Stables are very well organized group. Even when a larger group than originally expected group appeared. They split our 2 hour time slot into 2 groups instead of one larger one. Each group had both a lead rider and trailing rider. Safety seemed to be a high priority for the leaders. There was emphasis on how to approach, mount and ride the horses in a safe way. Helmets were provided for all that wanted them and use of helmets was encouraged. There were 10 riders from 8(ish) to much older. A person in charge selected horses of appropriate sizes based on each riders' size. My horse was very well suited to me and was well behaved.

Our ride began with a rather uneventful trek through a portion of residential area that borders Garden of the gods. This was a couple of blocks that included public roads and alleys. A trail was started about 10 minutes into the ride. First portion of the trail was easy and very wide. The horses knew were they were going and none ventured from the path. The first third a portion of the park that was generally easy with more gentile hills and valley like views.

The next 2/3 of the ride were primarily single horse width trails with changing terrain. Some climbs were very exhilarating both in final view of the area and ability of the horses to get up them. I was very thrilling to have my horse going down some rather steep steps with little effort. Even my youngest thought this was very exciting! Theses trails were not part of the general hiking area of the Garden of the gods if you were to go into the main rock formation area. We had views of part of that area, but our route focused on more of the perimeter. The views from the top of some of the hills are very breathtaking! The surrounding mountains and area are just beautiful. Words do not do justice to the majestic view that I had.

The ride lasted for 2 hours and included interesting commentary from the ride leaders. They made every effort to make sure all of the group was given information about the area we were in. Many times the end support rider would repeat the entire message to make sure the end riders understood. The information they provided was both interesting and worthwhile.

On a animal treatment note, I would like to commend the Academy Riding Stables for how well they seem to treat the animals in their care. Each horse that was brought for a rider was known by name and treated with kindness. Each of the riders was made aware that the horses should be allowed to drink their fill of water before the trip. Horse handling instructions were emphasized. All the horse stables seemed to be well kept and stocked with plenty of food. There was large areas for horsed to roam free. Heck even observed a couple of horses that were given showers while we were waiting for our turn to ride.

Make sure to get there early to fill out the paperwork. Reservations are required.

Google has lots of images
I will post some of my own pics very soon. I even used my DroidX with GPS tracking to map the route.
Note: I did not receive any compensation for this review.

Tuesday, August 2, 2011

CentOS 6.0 Zimbra 7.1.1 Open Source Edition install

Update 8/12/2011:
Good news! CentOS 6.x is out of beta and in stable with version 7.1.2 from HERE. In fact, you may just want to check their download page.

I wanted to take a peak at what is going on with Zimbra and CentOS 6 install capability. Currently, CentOS 6/RHEL 6 is listed as a beta for Zimbra 7.x installs. To to be deterred, I grabbed the beta download from the beta download page
wget http://files2.zimbra.com/downloads/7.1.1_GA/zcs-7.1.1_GA_3196.RHEL6_64.20110527010625.tgz
Test server is decent Dell Poweredge 2950 type II with 2 Intel quad core E5335 with 6GB RAM, RAID 1 for / (qty 2x80GB SATA) and RAID 5 for /opt (qty 4x500 SATA)
CentOS 6.0 x86_64 install was done as a "web server" install to provide most options I thought I would need as a start for the Zimbra install.

Note: I always suggest to install OMSA on any Dell server!

After the system is setup make sure that services that will interfere with Zimbra installed version are stopped and will not turn on at boot time:
chkconfig postfix off service postfix stop chkconfig httpd off service httpd stop tar -xzvf zcs-7.1.1_GA_3196.RHEL6_64.20110527010625.tgz cd zcs-7.1.1_GA_3196.RHEL6_64.20110527010625 ./install.sh
64 bit install but the installer still wants "libstdc++-4.4.4-13.el6.i686" installed.?
yum install libstdc++-4.4.4-13.el6.i686
Read Zimbra install info seems to be the moral of the story.

Finally installed with:
./install.sh --platform-override
followed prompts. Initial failure with log message with many:
sudo: sorry, you must have a tty to run sudo

Ran visudo to temporarily comment the "Defaults    requiretty" line and then ran:

/opt/zimbra/libexec/zmsetup.pl
To complete the install. Reboot just to make sure everything starts and begin the setup process. Now on to the much harder Zimbra setup!

Wow, still not done! Zimbra zmconfigd seems to need netcat, but is not a rpm requirement.??
yum -y install nc

Also, the install seems to need a patch before I can start working:
wget http://files2.zimbra.com/downloads/7.1.1_GA/zcs-patch-7.1.1_GA_3213.tgz

Sunday, July 31, 2011

CentOS 6.0 install on Dell E6410 laptop

First I would like to say, "Thank You!" to all of the hard working developers and other at CentOS. In spite of some VERY well published delays in getting CentOS 6.0 out the door, it's finally here! I hope to see 6.1 soon.

I am using a more recent Dell E6410 laptop with 4GB RAM, an Intel i7 M620 CPU and dedicated nVidia GT218 [NVS 3100M] video card. WIFI is handled by the Broadcom BCM4314 chipset. Pretty good by current standards. It's the same laptop I have used for my Fedora 13 review.

When I first went to burn the i386 .iso file, k3b greeted me with an interesting, "your image will not fit on your disk" kinda message. I was puzzled and then discovered the issue noted in the CentOS 6.0 release notes about the DVD+R media creation issue. Fair enough, I did not have at the time any other media, so I just overburned past the disk and tried to boot from the media anyway (which worked fine for *my* install). Just don't try to validate the disk ;)

Next, my default DVD install attempt was met with a very disappointing blank/black screen with the onboard Nvidia ??? video card. My good buddy google quickly lead me to some information that either "nomodeset" kernel option or install with the "basic video driver" would be needed. And either of those allowed me to move on through the install.

Reboot after install leads to a rather disappointing 800x600 resolution login screen. At least there is a login screen at all. First a quick <ctrl><alt><f2> key sequence to dump me to console in order to log in as root in order to do a full update and reboot just to see if that will help my screen resolution issue with the *default* install. Darn, still no better resolution! Need to jump to elrepo's kmod-nvidia fast.

Normally, the rpmfusion repository would be my way to get the included BCM4313 with a simple
yum -y install broadcom-wl kmod-wl-`uname -r`
After being told by yum that there was nothing to install, I scratched my head and google'd a bit and found that "Due to an excessively restrictive license accompanying this Broadcom driver, the ELRepo repository developers have refrained from supplying it via an rpm package" according to at least CentOS Broadcom page. Shame on you Broadcom... at least there is a way around the issue based on the instructions on the CentOS page noted! It would be so much easier if Broadcom's legal would just relax.

The bluetooth functions without issue. I could pair with my Droidx in seconds.

Sadly, I don't seem to be able to update the BIOS from the Dell OMSA repository. Initial indications are that they don't care.

Here's the lspci for the laptop:

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 02)
00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 05)
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)
00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)
00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
00:1f.2 RAID bus controller: Intel Corporation Mobile 82801 SATA RAID Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)
01:00.0 VGA compatible controller: nVidia Corporation GT218 [NVS 3100M] (rev a2)
01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
03:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g LP-PHY (rev 01)
04:00.0 SD Host controller: Ricoh Co Ltd Device e822 (rev 03)
04:00.4 FireWire (IEEE 1394): Ricoh Co Ltd Device e832 (rev 03)
3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
3f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
3f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

Helpful links:
E-Family Reimage “How-To” Guide
E6410 Manuals