Archive for the ‘How-Tos / Tips’ Category
Samsung TV Settings Reset at Power Off/On
This one is a bit off topic, but something that has been bugging me for the last week or so and I finally figured out, so I thought I’d share in case anyone out there is going through the same thing. I’ve been trying to adjust picture settings on our TV to get a little lower power consumption out of it, but every time I would change them, the settings would reset after 30 minutes or after restarting the TV. I dug through the manual and all over Samsung’s support site, but found nothing.
The answer was that the TV was stuck in a “demo mode” which is for when the TV is in the store so customers don’t mess up the settings too badly. With a little help from this thread, I was able to get it out. You can see if it’s in demo mode by hitting the “info” button the remote and if it says “demo mode” on the screen, then well I hope that explains it. Getting it out of this mode was trivial:
- Go to cable or air input
- Press volume up on the tv
- Press and hold the menu button on the tv
That’s it! You should be able to hit the info button again and actually see info for the channel.
Tags: offtopic, tv
Filed under How-Tos / Tips :
Comments (0) :
Nov 1st, 2010
Service Refresh Procedure with Puppet
I encountered an interesting question this week at work after a little mistake was made in a config template in Puppet. We had the wrong type of comment character get inserted, so the config file on the Puppet client wasn’t valid and the service went away. Fortunately, it was caught and fixed within seconds and didn’t cause much of a disruption, but it made us a bit nervous about service restarts since the init scripts should do a configtest before doing either a restart or reload.
The answer wasn’t overly obvious after a quick Google search, so I thought I’d share what I found. Turns out, if we had simply RTFM‘d, we’d have known that the default behavior of Puppet is to issue a stop then a start which explains why the service got stuck in that state. The reason for the stop/start behavior is because not all services across all distros do things properly, so they took the least common denominator and made the user specify that a correct restart in the init script was available. The answer was easy enough. Just add..
hasrestart => true,
.. as part of the service definition and you’re good to go.
Just to be clear, I wouldn’t ever want to depend upon this, but it’s nice to have a last line of defense since mistakes do happen on occasion (since we’re all human and all).
I was also pleased to see that there’s a feature request for a similar “hasreload” feature as well!
Tags: puppet
Filed under How-Tos / Tips :
Comments (1) :
Oct 7th, 2010
Chef on Ubuntu 10.04
I’m starting to play around a bit with Chef and tonight ran into some issues with setting up a Ubuntu 10.04 machine. The machine was configured as a JEOS box from the beginning, so that may have been messing with me a bit, but the getting started guide from Opscode didn’t quite get me up and running, so I thought I’d share what got me up and running.
To start out, the getting started guide recommended installing a copy of RubyGems from source. Since it was the same version, I tried it without doing that and just using the package manager. This was a mistake – don’t try it! As a side note, it’s frustrating the way Debian-based distro’s (and more so Ubuntu) tend to be the red-headed step-child when it comes to tools like this. Not sure what Ubuntu was doing wrong different, but it didn’t work. Anyway, be sure to install RubyGems from source as recommended.
After getting RubyGems installed “the right way” for Chef, I had some troubles installing chef via gem:
$ sudo gem install chef
Building native extensions. This could take a while...
ERROR: Error installing chef:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.4.2 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.4.2/ext/json/ext/generator/gem_make.out
After doing a quick Google search, turns out I didn’t have ruby-dev installed:
sudo apt-get install ruby-dev
After that, chef installed correctly.
Once I got past that, the knife utility still wouldn’t run, but instead threw:
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- net/https (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/rest.rb:23
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/client.rb:24
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/application/knife.rb:20
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/knife:23
from /usr/bin/knife:19:in `load'
from /usr/bin/knife:19
Again, after a bit of searching, turns out I was missing the Ruby OpenSSL packages:
sudo apt-get install libopenssl-ruby
All seems well now after a few snags. If you’re hitting my same issues, I hope this helps!
Tags: chef, ubuntu
Filed under How-Tos / Tips :
Comments (0) :
Sep 22nd, 2010
Upgrading Zimbra Server from Ubuntu 8.04 to 10.04
This last week Zimbra released its new version 6.0.8 which is the first version that supports Ubuntu 10.04 (still in beta, but package was released). Being a sucker for upgrades, I decided to give it a try tonight and upgrade my Zimbra server. The upgrade actually went pretty smooth, despite the fact that I’ve had bad luck with Ubuntu distro upgrades in the past.
To start, I had a server at Zimbra 6.0.7 on Ubuntu 8.04 (64-bit). I upgraded Ubuntu to 10.04 first and then Zimbra to 6.0.8.
The upgrade for Ubuntu is pretty straightforward and is outlined in their docs. Basically, make sure the install manager is up-to-date:
sudo apt-get install update-manager-core
Then, make sure Prompt is set to “lts” in /etc/update-manager/release-upgrades. (These two steps weren’t necessary for me and I didn’t do that on purpose, so it’s likely they are ok ‘out of the box’)
Then, perform the upgrade:
sudo do-release-upgrade
I did mine from an SSH session (gives a warning and starts another SSH server on an alternate port, but I didn’t have to worry about that). When the upgrader prompted, I took the defaults except for /etc/pam.d/common-*.
Once your new Ubuntu 10.04 server is up and running, we have to grab an additional dependency:
sudo apt-get install libperl5.10
I then just ran the install like normal, but skipped the integrity checks. The first time I let them run and hit this error:
perl: symbol lookup error: /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so: undefined symbol: Perl_Tstack_sp_ptr
The second time I just skipped the integrity check and everything went as normal.
I lost a few settings, the same as the 6.0.7 upgrade
. I wrote about them last time here. I also lost my zimbraMailMode setting again, same thing as the upgrade to 6.0.7.
After the settings were back, I noticed mail wouldn’t send out properly. /var/log/zimbra.log complained of the antivirus scanner being unavailable. A run of ‘zmcontrol status’ showed that clamd wasn’t running. When I tried to start the antivirus, it failed on starting clamd, showing this in /opt/zimbra/log/clamd.log:
/opt/zimbra/clamav/sbin/clamd: error while loading shared libraries: libltdl.so.7: cannot open shared object file: No such file or directory
Turns out it’s easy enough to fix:
apt-get install libltdl7
A restart of zmantivirusctl and all was good. (update: submitted bug for this)
Tags: ubuntu, zimbra
Filed under How-Tos / Tips :
Comments (2) :
Aug 28th, 2010
Zimbra Junk Mail Options You Didn’t Know Existed
I was poking around on the Zimbra forums today during some downtime and I ran across a little gem regarding configuration around a few options regarding spam delivery to users. The question was about disabling of spam filtering on a per-user basis (Yes, not really ideal, but sometimes you have to give users something I like to call ‘exactly what they asked for’), but I found even more than I expected.
Anyway, I thought I would highlight a few of the gems that I discovered.
Disabling mail to the Junk folder
This was actually the original question that I was trying to answer. Most Zimbra admins know how to whitelist/blacklist senders and other various tweaks in the Zimbra wiki, but I didn’t realize until today that we can actually configure Zimbra to not send mail filtered as junk to the Junk folder. This can be done per user, per domain, or per class of service (COS).
zmprov ma user@whatan00b.com +amavisSpamLover TRUE +amavisBypassSpamChecks TRUE
To disable, just make the + a -:
zmprov ma user@whatan00b.com -amavisSpamLover TRUE -amavisBypassSpamChecks TRUE
(or you can just set to false, but the default is false – I do like me some clean configs!)
And of course, change the command ma (modifyAccount) to match whatever type of object you want if you’re not modifying a user.
Letting banned files through to users
Every once in a while, I’ve struggled with users needing to get things like encrypted zip files or other suspicious-looking files. Not wanting to let all kinds of viruses though by disabling virus scanning and file extension blocks, it always ends up in a battle. Perhaps I’m the last to learn this one, but it’s actually easily bypassed on a per-user, per-domain, or per-COS basis.
zmprov ma user@whatan00b.com +amavisBannedFilesLover TRUE
You can also disable virus scanning for those various levels as well:
zmprov ma user@whatan00b.com +amavisBypassVirusChecks TRUE
Whitelisting and Blacklisting via zmprov (upgrade-safe!)
One of the new, well-known, features of Zimbra 6 is that you can now allow users to have their own white and blacklists, controllable within the user interface. Whitelisting and blacklisting has, of course, always been supported, but it’s been a pain as long as I’ve been managing Zimbra servers. If you’re one that already knew which wiki article I was referring to above, you know what I mean! To make matters worse, those settings have to be re-applied after upgrades.
While adding blacklist and whitelist senders to a user’s list via zmprov is expected (after all, you can configure it in the web client), what hasn’t really been touted – as far as I’ve read – is that those filters can easily be applied per domain as well. While that’s not really a new feature by any means, it does mean that those whitelist and blacklist lists are in Zimbra’s LDAP – where they should’ve been all along. That, and LDAP doesn’t get wiped during upgrades / service restarts like some config files do.
zmprov md whatan00b.com +amavisBlacklistSender @exchange.microsoft.com
Loosening up spam tag levels
You can also adjust the spam scoring levels to mark messages as junk/not junk on the various levels as well. The properties to adjust are: amavisSpamTagLevel, amavisSpamTag2Level, and amavisSpamKillLevel.
Warning: with these settings, be sure that you know exactly what each of these mean. That rule always applies, of course, but getting those settings wrong could cause your mail server to drop messages without bouncing them, thus neither sender nor receiver knows!
So many more!
This turned into a much longer post than I expected, but there are so many more options available! Check out /opt/zimbra/conf/attrs/amavisd-new-attrs.xml on your Zimbra server for even more config options.
Extra Credit
Also, check out /opt/zimbra/conf/attrs/zimbra-attrs.xml for even more goodness (unrelated to junk mail).
Tags: spam, zimbra
Filed under How-Tos / Tips :
Comments (3) :
Jul 26th, 2010