Monday, June 30, 2014

Early Life Nutrition, Epigenetics and Programming of Later Life Disease

An article on *how* epigenetics can work and how these changes can be passed on to subsequent offspring. It’s a rather profound thought that your persistent decisions today can genetically affect your grand children.


These are always interesting reads, if a bit slow-going when you’re not already familiar with the specific terminology used.


http://ift.tt/1x8SJO1





Saturday, June 28, 2014

Adding Users to Cygwin

Cygwin users have to first have a Windows account.


1. Create a new user. The permissions you assign to this user are the “real” permissions on things you access through Cygwin.


2. Once the Windows user is created, you need to tell Cygwin about it with this command:


mkpasswd -l -u the_new_windows_user_you_created >> /etc/passwd


This creates the appropriate user in the /etc/passwd file, which, like regular Linux installs, shows the available users on the install. Notice the Windows user UID is one of the things that shows up in the line in this file – Cygwin tells Windows “this UID wants to do thus-and-such”.





Cloning a machine that has the Salt minion on it already

If you naively clone a machine with the salt minion on it, things won’t work when the clone comes up (assuming you want to keep the original running too). You need to have the salt minion on the newly cloned machine redo the pki “stuff”.


The easiest way is to just uninstall, delete /etc/salt/ and then reinstall, eg. “yum install salt-minion”


Make sure to update the IP of your salt master in /etc/salt/minion





Friday, June 27, 2014

Setting up a new MySQL 5.5 (Percona) Slave by Simpy cloning an existing slave

It’s a bit more involved than simply cloning and being done with it, but it’s not too bad. The problem really only happen if you change the host name of the cloned server. This is specifically with Percona XtraDB 5.6.15-rel63.0.


- clone the VM


- nano /etc/my.cnf

– change the serverid to something different, just in case


- nano /var/lib/mysql/auto.cnf

– change the server-uuid somehow (just change any ol’ “a” to “b”… this is a guid, it’s arbitrary anyways). If you don’t, you’ll get this message spamming the logs: “Slave: received end packet from server, apparent master shutdown:”


- nano /var/lib/mysql/relay-log.inf

– change the name of the relay-bin file name (in my case it was still pointed at the previous host name.


Restart the mysql service and then check the error log here: /var/log/mysqld.log (or wherever your install has logs)


I think that’s everything… Hope it helps.


This pointed me in the right direction with the “received end packet….” thing: http://ift.tt/1wTCG6t





Tuesday, June 24, 2014

Monday, June 23, 2014

Manage sudoer users better

Instead of opening up your /etc/sudoers file to allow users to “sudo up to root”, just add one file per user in /etc/sudoers.d/. One file per user or just put them all in one file. Your call.


Create a user called “test”.


Then, to allow that user to be able to log in to the “root” account, do this:


nano /etc/sudoers.d/test


Then paste in this:

test ALL=(ALL) ALL


Then, after you log in with that “test” user, type this to “sudo up to root”:

sudo -H -s


After typing in the “test” user password again, you will be logged in as “root”.