Posts

Showing posts from 2013

Fork a Process Attached to my Terminal

So I was dinkering around in my terminal one day and thought I had one program running in the background, when really it was gedit. The first instance of gedit will of course, block my terminal, and I won't be able to use the terminal because it's attached to the GUI. If I wanted my terminal back, I could always Ctrl+Z and go on about my day - but wait, gedit is frozen and I can't use it unless I return my terminal to it by running "fg". Ok, I can close gedit and lose all my tabs, or save my state in a session, and proceed to "gedit &" to run a fork in the background. That's annoying though. So, I saw this and it dawned on me what's going on in the details: root@localhost:/srv/salt#fg gedit top.sls 2> /dev/null > /dev/null ^Z [1]+ Stopped gedit top.sls 2> /dev/null > /dev/null Wait, so the process is "Stopped" ??!? >_> .... ... .. !!! root@localhost:/srv/salt#ps faux|grep gedit root 29482 0.8 ...

Firewall Check

I'm sure there are plenty of tools out there that do better than I, but this was my hack and I'm going to put it out there... So, on the server, I setup its own user account. Its shell was set to something I could control, and it did exactly what I was looking for in a couple of commands: # Add a temp user to the system so we can tinker around with this... adduser --home=/tmp/netcat --shell=/tmp/netcat/nc --ingroup=nogroup --disabled-password --system tmpnetcat # Setup the home so I can login using SSH keys since passwords are disabled anyways... install -d -otmpnetcat -gnogroup -m0700 /tmp/netcat/.ssh install -otmpnetcat -gnogroup -m640 ~/.ssh/id_rsa.pub /tmp/netcat/.ssh/authorized_keys # Enable this user for accesing /bin/nc without a password as root so they can bind to any address for testing. echo -e '\n\ntmpnetcat ALL=NOPASSWD: /bin/nc' >> /etc/sudoers # Insert the script we'll execute when this user logs in. cat <<NCEXEC > /tmp/netcat/nc #!/bin...

Complaints and Achievements

If there's one thing I notice about people in my day to day interactions, it's that people do a lot of complaining. No, this is nothing recent, but a collection of things I've seen over time in my years talking to people... Do we have to talk about how much we hate our jobs? Do we need to discuss the reasons why we're so tired all the time? Do we HAVE to point out just how much of a drag it is to work? Look people... If you feel so bad about life and what it is today, then why not go ahead and shove off and move on to the next thing in your spiritual adventure. In the meantime, those of us that actually want to achieve something will continue to get the fsck off this rock. I want to talk about our achievements. I want to talk about our goals. I want to talk about our success. Instead of talking about how tired you are - talk about what you're going to do throughout the day. Focus less on your fatigue and it will seem less apparent to you. "Out of sight, out of ...

Special Characters In Passwords

In this day and age of technology, we all need access to our protected data. In order to do that, you need a good password. What if you're not allowed to create a good password? Too often, I see web forms that try to be clever in that they require you to have a uppercase, lowercase and a number in order to make your password stronger and harder to guess. Then they turn around and deny you the use of special characters. That's like walking into a bar, and the minimum is 3 drinks and you think you're going to have a good time, until you find out they watered the beer down to >1.5% - Good job! Other instances, I see web forms that totally DENY you the use of anything except alphanumeric characters. I've never seen an instance of a web form that does this legitimately. The only excuse for this is because the developer who created the form didn't properly escape the data before printing it to the next stream. This is ridiculous! The best thing you can do for your user...

apt-get update markizano

Hey all, So you might have noticed that there suddenly is a page going on at the big www :) Just a heads up: It's up and running: http://www.markizano.net/ . I want this to be a place where I can say I designed something from scratch. I know that doesn't sound like me - and for the record: I'm still no designer and most will probably laugh at my choice of color scheme. Hey - you can't say I didn't warn you! Though, all work here is my own, or I contributed a decent chunk to its production. Take caution and tread lightly - the site is still in development, but is at least presentable. I have further plans for the layout so don't count on the theme staying the same for long =) Cheers!