Feb 8, 2013
tom

Save file after forgetting to open as root / sudo vi [duplicate]

Possible Duplicate: vim re-edit as root I could have sworn I saw this question asked. But after looking though every search result for “vi” I’m stumped/lazy. I’ve opened a file, made an edit and now I realize it’s read only and I’ve opened it as non-root me. Asked by MathewC I think you want something like this: :w !sudo tee “%” I first saw it on commandlinefu. The quotes are only necessary if the file [...]

Continue Reading »
Feb 7, 2013
tom

How to set up different MX records for outbound and inbound email?

I would like to use my own outbound email server Haraka with Node.js and Google Apps for inbound mail. Now my domain registrar gives one click Google Apps setup, however I’ve already set up my own outbound server and it says: Caution: The main domain name (www.)mydomain.com is using MX : mail.mydomain.com already. If you want to add Google Apps, you need create a subdomain, e.g. xyz.mydomain.com or remove MX : mail.mydomain.com. So how can [...]

Continue Reading »
Feb 3, 2013
tom

Adding a timestamp to bash script log

I have a constantly running script that I output to a log file: script.sh >> /var/log/logfile I’d like to add a timestamp before each line that is appended to the log. Like: Sat Sep 10 21:33:06 UTC 2011 The server has booted up. Hmmph. Is there any jujitsu I can use? Asked by Antonius Bloch You can pipe the script’s output through a loop that prefixes the current date and time: ./script.sh | while IFS= [...]

Continue Reading »
Jan 30, 2013
tom

Multi-WAN bonding across different media

I’ve recently been thinking again about a product that Viprinet provide, basically they’ve got a pair of routers, one that lives in a datacentre, Their VPN Multichannel Hub and the on-site hardware, their VPN multichannel routers They’ve also got a bunch of interface cards (like HWICs) for 3G, UMTS, Ethernet, ADSL and ISDN adapters. Their main spiel seems to be bonding across different media. It’s something that I’d really like to use for a couple [...]

Continue Reading »
Jan 26, 2013
tom

Postfix smtpd won’t talk to saslauthd

I have an saslauthd setup to authenticate against PAM. It seems to do its stuff: root@sasltest:~# testsaslauthd -u quest -p #### -s smtp 0: OK “Success.” I have libsasl 2.1.23, postfix 2.7.1. I have a postfix configured thus: smtpd_sasl_type = cyrus smtpd_sasl_path = /var/spool/postfix/private/saslauthd/mux smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_security_options = noanonymous With a master.cf thus: submission inet n – - – - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject However, trying to authenticate [...]

Continue Reading »
Jan 26, 2013
tom

Pointing domain to custom DNSs which contain the domain

I need to change the DNSs of my domain, and I’m getting an error that the DNSs aren’t registered. Maybe they simply haven’t propogated yet, but it ocurred to me that what I’m doing seems kind of recursive. If my domain is example.com and my DNSs are ns1.example.com and ns2.example.com, is there a problem with doing that? It seems like I’m trying to point the domain to itself. And in case you’re wondering, I didn’t [...]

Continue Reading »
Jan 26, 2013
tom

is this a real or virtual server

Provided the following screenshot and the suspicius Red Hat VirtIO NIC, is this server a dedicated one or a VPS (VM)? Click to view in original size. Thanks in advance! Asked by user156194 Red hat virtio ethernet, qemu dvd, red hat virtio scsi. This is a VPS running KVM on the real server. Answered by Dennis Kaarsemaker Check more discussion of this question. Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit [...]

Continue Reading »
Jan 26, 2013
tom

Puppet 3.0: am I supposed to be able to invoke a module from a similarly named subclass of another module?

I have a module named drbd which I need to use in another module named hacluster. Initially I thought to segregate drbd’s stuff in its own class like this: modules/drbd/[stuff] # this is the DRBD module modules/hacluster/manifests/init.pp # class hacluster { include hacluster::drbd } modules/hacluster/manifests/drbd.pp # class hacluster::drbd The hacluster::drbd class installs and configures DRBD like this: class hacluster::drbd { class { ‘drbd’: service_ensure => undef, service_enable => false, } class { ‘drbd::global_common’: …more stuff… [...]

Continue Reading »
Jan 26, 2013
tom

Looking for app/service to silently capture file changes in website (like SVN but automatic check-in) for auditing purposes

Here’s the background to my question: A number of people deploy changes to our ASP.NET website … designers deploy HTML and CSS changes, .NET developers deploy ASPX, DLL files, graphic designers deploy images, etc etc. In theory all these deployments are done in a very controlled way – source code is maintained in SVN, deployment packages are created and version controlled, deployments are tested first on a pre-production site, deployments to live are documented. In [...]

Continue Reading »
Jan 26, 2013
tom

Ping hostname returns another hostname in output : what does it mean?

When I ping the server sip3.voip-centrex.net, I get this output: PING sip3.voip-centrex.net (194.98.81.144) 56(84) bytes of data. 64 bytes from mpfrrelay.michaelpage.fr (194.98.81.144): icmp_req=1 ttl=50 time=35.7 ms 64 bytes from mpfrrelay.michaelpage.fr (194.98.81.144): icmp_req=2 ttl=50 time=38.1 ms 64 bytes from mpfrrelay.michaelpage.fr (194.98.81.144): icmp_req=3 ttl=50 time=34.6 ms Domain name does not match. What does it mean ? Asked by alci The DNS system has many kinds of records. “A” records map names to IP addresses. “PTR” records map [...]

Continue Reading »