I’ve been working on improving my script to add users and set their passwords. With my current role, I add plenty of users on a daily basis, and sometimes there’s more than a few having to be added. When this happens, the old script just isn’t cutting the mustard. So thanks to a colleague of mine who pointed me in the right direction, this little baby was created:

for i in List Of Your Users; do echo useradd -p `dd if=/dev/urandom bs=10 count=1|base64` $i |tee -a /path/to/file.txt; done</pre>

Hopefully, you’ll find it as useful as I do.

Cheers,

Aaron


sparkHeya folks. I’ve started a project to automate watering my balcony garden at my apartment. As part of this project, I’m using a Spark Core and my Raspi to accomplish this. One of the things I want to be able to do over the course of this project is to interface with the Spark via the command line. It just so happens that there’s the spark-cli tool to do that.

Herein lies the reason for the post, and here’s the TL;DR: For spark-cli to work on the pi, you need to install node.js and npm the node.js website, not the standard version you get with Raspian.

It took me ~2 hours to figure all of this out. The post that helped me get past the issues here was Josh Marinacci’s post about installing node on a raspi in 5 minutes. I ran across several posts detailing installing the process of installing a version of node.js needed for the Spark Core, including the one on Spark’s site. However, after multiple runs at installing node from Spark’s tutorial, I was still getting nowhere.

So to get node.js & npm working on your raspi, head over to Josh Marinacci’s site and follow his instructions. From there, you can install spark-cli via the following:

$ sudo npm -g install spark-cli $ spark</pre>

To see a full list of what you can do with the spark-cli tool, head over to their Github page and check it out. Hopefully you find this helpful and hopefully this will help you save a bit of time during the install.


Heya folks! Just a quick and dirty script to show enabled php modules from the command line:

php -r "phpinfo();" | grep -i enabled</pre>

I’ve found this one to be particularly helpful in finding out what is installed–especially if I need to know if something like mysqli support is enabled.

Cheers,

Aaron


Just a quick script for you today, and it’s an easy one–Add a user and set a password in one line:

useradd YOURNEWUSER && echo YOURUSERSPASSWORD | passwd YOURNEWUSER --stdin</pre>

I use this quite a bit if I’ve got to add a user/multiple users. Hopefully you’ll be able to use this in your job.

Cheers,

Aaron


Hi there! I know it’s been a while since I’ve posted last. Life has been quite busy, as I’ve recently moved. With the new move to San Antonio, I think it’s time that the blog gets a facelift. In this case, it’s not going to be much of one. Rather, I’m thinking of stripping away the fluff, the stuff that doesn’t matter, and the stuff that distracts from what I want to do. I’m writing this in part to chronicle my journey as a new Linux sysadmin, and in part, to continue the things that really drive me, like customer service, process, and how I can get better at documenting what I do, whether it’s technical, or not technical.

That being said, you’ll find the new blog is not nearly as flashy. I want the focus to be on the content, and what I write, versus whether or not the blog “looks good.” In the mean time, I invite you to join me on this new journey as I delve deeper into the Linux world. As a new Linux admin, I invite you to also share tips and tricks you’ve found to be useful in your journey. In the mean time, stay tuned for new posts!

Cheers,

Aaron