Sponsored Content
Operating Systems OS X (Apple) Creating Shell Script for STIG Checklist MAC OSX 10.6 Post 302565678 by john3j04 on Tuesday 18th of October 2011 01:01:10 PM
Old 10-18-2011
Error Creating Shell Script for STIG Checklist MAC OSX 10.6

Hello,

I am new to Mac OSX and shell scripting all together. I was wondering if anyone could help get me started in a few scenarios so that I would be able to automate checking a system against a STIG checklist. A STIG Checklist is a DoD Guideline for securing systems. Here is the first instance I would like to learn how to automate:

Open a terminal session and use the following command to view the setting for password history.

sudo pwpolicy -n -getglobalpolicy | tr " " "\n" | grep usingHistory

If the value of usingHistory is less than 15, this is a finding.

NOTE: If the command returns a response of password server is not configured, the system is not managed. Use the following command for non-managed systems.

pwpolicy -n /Local/Default -getglobalpolicy | tr " " "\n" | grep usingHistory



Now, I know that it tells you what to check and makes it so that anyone can perform this check, so please excuse my stupidity. We all have to start somewhere.

I am not interested in fixing a system, just running a script against a system to see if it conforms to the guideline or not. It would be nice if output could be printed telling me if it passes or not, or even print the output into a log file. There will be a couple of hundred checks that I will have to do, so all output will have to go to a log file.

Thank you for your time and assistance!
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

ssh and Mac OSX

Please help if you are familiar with Mac OSX. I downloaded OpenSSH for a newer version of SSH than what comes with OS 10.1. What a mistake! Now every time I try to make a connection to my remote server I get an message that ssh was built against version such and such and I have version such and... (2 Replies)
Discussion started by: glfisfn
2 Replies

2. UNIX Desktop Questions & Answers

Mac Osx.2

I finally broke down and decided to buy a new piece of hardware. I think I made the right decision when I chose an Apple iBook - OSX is incredible! I haven't used a Mac since System7.5, and 10.2 is just blowing me away! Best of all, it's easy to use for people who are not used to Mac, but if I... (5 Replies)
Discussion started by: LivinFree
5 Replies

3. Shell Programming and Scripting

Checklist for Shell Script reqd

Hi, Can anyone provide me with the Code Review Checklist for Shell scripts ?? Thanks in advance. (2 Replies)
Discussion started by: Shivdatta
2 Replies

4. OS X (Apple)

Mac OSX kernel

is there anyway of looking at, and if possible, modifying it? (2 Replies)
Discussion started by: cleansing_flame
2 Replies

5. Shell Programming and Scripting

#!/bin/bash and #1bin/sh command not found error on mac osx terminal/shell script

i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine. then last week i wrote capture.sh and it... (2 Replies)
Discussion started by: danpaluska
2 Replies

6. OS X (Apple)

Cron on Mac OSX

Hello, I was wondering about my Cron Script: HELL=/bin/tcsh PATH=/sbin:/bin:/usr/sbin:/usr/bin HOME=/var/log MAILTO=jwillis 25 1 * * * root /Users/jwillis/Fbcmd\Scripts/DailyBirthday.scrmy returned message is: Subject: Cron <jwillis@Macintosh-66> root ... (1 Reply)
Discussion started by: jwillis0720
1 Replies

7. UNIX for Dummies Questions & Answers

Mac OSX Cron Script Execution

Hello, On Mac OSX, I was wondering about my Cron Script: HELL=/bin/tcsh PATH=/sbin:/bin:/usr/sbin:/usr/bin HOME=/var/log MAILTO=jwillis 25 1 * * * root /Users/jwillis/Fbcmd\Scripts/DailyBirthday.scrmy returned message is: Subject: Cron... (3 Replies)
Discussion started by: jwillis0720
3 Replies

8. UNIX for Advanced & Expert Users

UML on MAC OSX

Hey guyz, Is it possible to build user-mode linux kernel on MAC OSX? Please I need a reply asap as I have an assignment that I need to do. Thanks! Adel (1 Reply)
Discussion started by: aje02
1 Replies

9. UNIX Desktop Questions & Answers

X11 Display Problem with Mac OSX after creating new account

For preliminaries, I am on a Mac Pro running 10.5. I am trying to run a program that opens an X11 graphic and plots a mesh. The little program is called showme. It has worked just fine in the past. Up until I had to make a new user account on this machine for myself. Now every time I try to... (8 Replies)
Discussion started by: Bocephus85
8 Replies

10. Shell Programming and Scripting

Creating an script to automate on mac

First of all, i'm sorry if this topic isn't in the right place, I have a Mac and I've read that is unix based, that's why I'm writing here. I'm trying to "create" a script with which i will be able to download any Tv Show automatically and then rename it. I'm using for that goal the following... (1 Reply)
Discussion started by: Qyles
1 Replies
QTADS(6)							   User Manuals 							  QTADS(6)

NAME
QTads - Multimedia interpreter for TADS games SYNOPSIS
qtads [ game-file ] DESCRIPTION
QTads is an interpreter that can run games written in TADS. TADS is a programming language written by Michael J. Roberts, designed to implement text-adventure games (Interactive Fiction), similar to those developed by Infocom in 1980-1990, as well as other companies (like Legend Entertainment, Level 9, etc). If you liked games like "Zork", "Adventure", "Trinity", or "Eric the Unready", you'll feel right at home. This version of QTads supports both TADS versions in use today; traditional TADS 2 as well as the new TADS 3 format. It runs on a variety of systems, including MS Windows and every Unix system for which the Qt library is available, including Linux and Mac OSX. OPTIONS
With no arguments, QTads will by default ask you for a filename, unless this prompting has been disabled in the configuration dialog. The optional filename can be used to start a game immediately. LICENSE
QTads is a Free program, dual-licensed under the GNU General Public License (GPL) as well as the HTML TADS Freeware Source Code License. See the file COPYING (included in the package of the program), or the "Help->About" menu for details. AUTHORS
This program is written and maintained by Nikos Chantziaras <realnc@gmail.com>. ACKNOWLEDGEMENTS
The reference implementation of the TADS VM was done by Mike Roberts. Several people helped making QTads a better program. See the file CREDITS or the "Help->About" menu for a list of names. SEE ALSO
frotz(6), inform(1) April 2010 QTADS(6)
All times are GMT -4. The time now is 02:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy