Author: mark_user

  • Managing User Accounts with Ansible

    Managing User Accounts with Ansible

    Introduction

    Ansible is a program designed to manage Linux servers. See blog post on setting up Ansible, creating a script, creating an inventory file, and calling a script from the command line. You can call a single server or multiple servers by separating then with a colon on the ‘hosts’ line. If a large number of hosts needs to be called, create a group in the inventory.ini file and call the group on the ‘hosts’ line.

    Create a New User’s Account on Multiple Servers

    When a new hire comes onboard, rather than log into each server directly and manually create their accounts, run this script and it will create the accounts on all servers simultaneously.

    Get a List of Servers that have a Specific User’s Account

    If a user leaves the company, you can never be sure what Linux servers they were given access to, so I run this to get a list of what servers they have accounts. It outputs the results to a text file, which the results can be easily be viewed. This script calls a host group called “all_servers” in the inventory.ini file.

    Remove A User’s Account

    Once you have identified which servers the user has an account on, add the username to the script and specify the target hosts. As before, you can list multiple servers, separated by a colon, or create a group in the *ini file and then add the group name to the ‘hosts’ line.

    Push a Key to Multiple Servers

    It is recommended that users login using public and private keys. It is easy to push a users public key to multiple servers at same time. Replace the ‘key’, with the user’s actual public key surrounded by double quotes.

    The authorized key command handles creating the directors and setting permissions on all files.

    Change a User’s Password

    Perhaps a user forgot their password, or they have left the company. You may need to change their password. Again, modify the ‘hosts’ line as necessary, with a single, multiple, or a group of servers.

  • Make a Batch Script to Map Your Drives

    Make a Batch Script to Map Your Drives

    Introduction

    Although Microsoft calls it mapping a drive, in truth, you are just mapping the location of a specific local or remote folder. You are not technically mapping an entire hard drive.

    There are several reasons it is worthwhile to write a batch script that can auto connect your frequently used folders. A common reason is that enterprise users frequently get their network folders disconnected. Problems arise from VPN disconnects, power fluctuations, or other concerns.

    We can make a batch script and save it on their desktop (or in their startup folder) to quickly get their folders re-connected. The user’s just need to double click the script file and it will quickly restore their network folders.

    Map the folders (aka. drives)

    Let’s create a script called ‘mapdrives.bat’ using notepad.

    Add information to the headers. Anything with REM or :: will not be executed.

    Use ‘echo off’, at the top of the script. This tells the script to not display the commands or results to the screen, as they are executed. Use ‘echo.’ to print a blank line, and use just ‘echo’ to print data to the screen.

    Comment your code using descriptors and use ‘net use’ to map the folder paths. Be sure to put quotes around the file path if there is a space somewhere in the path.

    Let’s create a short delay and exit the program. We can add the command ‘pause’ and it will hold the command prompt open until a key is struck or use ‘ping’ and it will wait three seconds and exit automatically.

    Finally, save the file with ‘.bat’ file extension and then double click the file to execute it.

    Open File Explorer and you will see your newly mapped folders.

  • Change Font Size in KeePass

    Change Font Size in KeePass

    Go to Tools > Options > Interface (2). Change custom list font and custom password font from default 8pt to 10 or 11pt.

  • Insider’s Recipes Cook Book

    Insider’s Recipes Cook Book

    I got this a long time ago, and can’t remember where. But it claims to have hundreds of your favorite restaurant recipes.

  • Bruschetta

    Bruschetta

    By Betty Crocker

    1 cup pitted ripe olives
    2 cloves garlic, minced
    2 tsp balsamic vinegar or red wine vinegar
    1 tsp olive oil
    1 tsp capers, drained
    1 1/3 cup chopped tomato
    1/3 cup thinly sliced green onions
    1 Tbl. fresh basil or 1 tsp dried basil
    1 Tbl. olive oil
    1/8 tsp pepper
    8-oz loaf French bread
    2 Tbl. olive oil
    1/2 cup grated parmesan cheese

    In food processor combine olives, garlic, vinegar, capers, and 1 tsp olive oil. Blend until a paste forms. In small bowl, combine chopped tomatoes, green onions, basil, pepper, and 1 Tbl of olive oil. Cut bread into 1/2 in think slices. Use 2 tbl oil to lightly brush both sides. Place on ungreased baking sheet. Bake 425 until crisp (about 5 minutes). Spread each piece of toast with olive oil paste, tomato toppings, and sprinkle parmesan cheese.

    Bake at 425 for 3 minutes until cheese melts.

  • Vegetable Crab Dip

    Vegetable Crab Dip

    Vegetable Crab Dip – By Bonnie R.

    1 envelope Lipton vegetable soup mix
    1 16oz sour cream
    1 can (6.5 oz.) crab meat or 1 cup thawed crabmeat
    1 package (3 oz.) cream cheese, softened
    1 tsp lemon juice

    Preheat oven to 325. In large 1 qt casserole dish, combine all ingredients. Bake uncovered 30 minutes or until heated through.

    Alternate.
    Mix ingredients in crock pot. Cook on high for 1 hour.