Wednesday, September 27, 2006

I'm very tempted to try and put Python + QT to work. A good reference should be able to deal with the diffrences between the C Standard library and what Python offers. I know KPorts is available as a crazy PBI for PC-BSD to give people a gui frontend for ports/packages but. While it gets the job done it's too darn crashy !


If I could manage to do it (would be learning my first toolkit), a frontend thats got full support for portupgrade and portaduit, strong searching and is reliable + configurable is nice. Functionality, Ease of Use, something thats easy for a newbie but powerful enough to be a professionals tool. Maybe add support for pkgsrc or emerge and stuff in the future. I dunno if I could with how much I know about programming now but there's always the future.

If I did it I'd want to try and keep things tidy, like so:

Implement code to manage ports

Create a graphical interface using QT

Trim things to allow a great deal of seperation between functional code and user interaction so that it'd be possible to have diffrent GUI's but not have to rewrite all of or edit most of the code that actually does the job.

Monday, September 25, 2006

Hoozah for ports !

Well after installing samba3 from packages I was never quite able to get samba working, before when I had tried on an older *BSD install I was able to get it working up to the point of asking for a longin.

Ripped out all the pkg's and sterilized the system, only cvsup-without-gui and fastest_cvsup installed via pkg_add -r. Installed the full ports collection (I had only install a few parts of it before) and built samba.

cd /usr/ports/net/samba3/
make install clean
It asks what options you want to build support for, defualt I saw no need to change but added support for syslog.

OPTIONS=   LDAP            "With LDAP support" on \
           ADS             "With Active Directory support" off \
           CUPS            "With CUPS printing support" on \
           WINBIND         "With WinBIND support" on \
           ACL_SUPPORT     "With ACL support" off \
           AIO_SUPPORT     "With experimental AIO support" off \
           FAM_SUPPORT     "With File Alteration Monitor" off \
           SYSLOG          "With Syslog support" off \
           QUOTAS          "With Disk quota support" off \
           UTMP            "With UTMP accounting support" on \
           MSDFS           "With MSDFS support" off \
           SMBSH           "With SMBSH wrapper for UNIX commands" off \
           PAM_SMBPASS     "With PAM authentication against passdb backend(s)" off \
           EXP_MODULES     "With experimental module(s)" off \
           POPT            "With system-wide POPT library" on
Defualt was ldap, cups, winbind, utmp, and popt.

She took about a hour to an hour and a half to compile on Vectra, which is a 500Mhz P3 and 384MB Ram (-8mb for video card). I don't really mind using ports, actually I love ports it's just a bit slow on older hardware. Still even with my desktops Pentium D 930/2GB fast ram I'd not want to compile OpenOffice, Xorg or KDE/GNOME. Since it's late and I've got to be at work tomorrow (today) I did a quick google and found this link and followed it as a base of what options I'd need in my smb.conf.

Note that when building samba at the end it gave me

NOTICE: This version of port has changed location of Samba password
===> NOTICE: (smbpasswd) directory. Files in '/usr/local/private'
===> NOTICE: have moved to '/usr/local/etc/samba'.
===> Found saved configuration for samba-3.0.23c,1

Since this is BSD and not a GNU/Linux disto samba is third party software installed via ports, which basically means look under /usr/local/ for things not the root directory (/) with FreeBSD. So it'd never be in /etc/ like on some GNU/Linux systems. I created a basic smb.conf in vi, I'll use cat to show it.

rstf@Vectra-%cat /usr/local/etc/smb.conf
#Samba config file for Vectra II

[global]
#workgroup, server name, and encrpy the passwords
#================================================#
workgroup = BSDNet
netbios name = Vectra
#encrpyt passwords = yes

#===================Shares=======================#

[files]
path = /usr/home/samba/files
read only = no
browseable = yes
public = yes
After running testparm on the configuration file I found out that the encrpyted passwords thing was trainsient so I commented it out. Don't ask me why I chose BSDNet, it's my SSID for my Wireless network and, well most of my stuff is running BSD :-)
Vectra is so I know it's on my HP Vli8 500 (Vectra II). The share is named files since thats what I plan to put there, I thought /samba/files would be good but it didn't feel right with the directory structure, /usr/local/samba/files maybe but /usr/home/samba/ seemed a good enough place to put LAN wide shares. Made the directory like so

mkdir -pm 777 /usr/home/samba/files

To setup my *BSD user I ran adduser and gave myself a personal user on the box -> No need to put your self in a special group although I did consider using nobody as an option. I also always use a User ID (UID) of 1988 when possible so I know it's my account. Added the right data for samba

smdpasswd -n Terry

Note that the username and password should be the same as the box you will be accessing the shares from ! I'll worry about tighting security when I have more time to work on the box. Supprisingly a portaudit gave warnings for the samba package but none for the port.

Check if smbd is running, I used the sockstat command to check, it was running so:
/usr/local/etc/rc.d/samba
restart or stop then start isntead of restart.

On my laptop I tried to join using smbclient and was amazed, go ports !!

Terry@Dixie-%smbclient //Vectra/files
Password:
Domain=[VECTRA] OS=[Unix] Server=[Samba 3.0.23c]
smb: \>

Very much to my joy it was a home directory I could not cd out of, I'll need to toy with this later and probably I'll chgrp the files share and my user to some proper group that I can use for this.

RELATED TODOS:
Test Samba from Windows (Which is why I need samba)
Secure samba as much as possible while keeping with what I need open
Move some files over
Get ready to cups and print or kill at some point & share it.
Recompile kernel and setup pf e.t.c.
Continue with implementing what ever security proceedures I can think of
Try to gather as much information about the system from another machine and try to gain shell access to my Vectra simula-illictly, then seal any holes I might've found or can think of as part of operations "Break in" and "Onion". It's my computer so it's my right to be able to test my own security measures rather then wait, watch, and wonder for it to be compromised. Although I doubt any one would bother even if they could easily, it's good expirence to gain & fun when it works or has a logical reason for not working.

Time to sleep

Saturday, September 23, 2006

Memlogging

I can't remember how on earth I got in to programming dang gum it. When we got our first Pentium PC about 2000 or 2001. She had Win98 in a FAT16 partition, like a 250MB hard drive, 32MB RAM, and maybe a 133Mhz clock speed. I looked over the system, all the menus and stuff. Usually I didn't toy with changing stuff for fear that if I fouled it up Ma would kill me. It was technically her E-Machine, and my replacement for WebTV (Yes I first browsed the WWW on one). I spent upwards of 8 hours a day looking through Windows and surfing, mostly Mobile Suit Gundam stuff and made a great study of the One Year War era (I had just learned their was more then Gundam Wing). After awhile the box got a bit cranky as we didn't even know how to power it doen properly. We we're told how with out first (a Tandy 1000) not this one. Eventially the HDC or Hard Drive Controller failed, we then we're given our pastors old PC.

A Packered Bell 1998 machine with like a PII 233Mhz, 64mb of RAM, 2.4GB drive & a dual boot of Win98 and MS-DOS. Never used the DOS for fear of not being able to reboot into Windows and getting killed. When it's copy of Windows died we got a Dell 4550, P4 2.0Ghz, 256MB RAM, 120GB drive, CD-Burner and WinXP. I was of course up-set with XP but estatic at the machine, never knew they had gotton so powerful. January 2002 I got my first PC Game and started a war with ma (hates idea of PC Games). I eventially got into gaming and made a few friends, got more and more into the computer after awhile.

Eventially for some fricken reason I can't remember :! got into programming. A friend I met & trained with in one of my games who was into Python showed me this document one day and changed my path. I started to see the diffrence between the "Hackers" I'd seen and delt with. (Script Kiddies and P.I.T.A. Ballock heads) we're not the same as people who, well actually dug computers rather then abused them. I started learning about UNIX and started to repsect people /w computer skills more. Eventially I desided to follow my friends advice and learn to use a unix like OS, he loved Linux and I always wondered about it. Sure enough, having to read the manual before installing type I am. I did *ALLOT* of research and eventually found out I ether would go with Debian, Slackware or FreeBSD and GNU/Linux wasn't my bag so FreeBSD it was. In my search of what a *nix desktop would look like some how I was blessed with finding PC-BSD, I wanted to learn but I didn't want to crack my skull open. I figured /w PC-BSD if I turned out to be a schmuck without WinXP I'd still be able to learn at my own pace. Sure enough ma wouldn't let me repartition her computer. I registored on the techsupport forums @ http://www.pcbsd.com/ and hung around, hoping to grep some information while I awaited away to buy parts to build my dream girl. One of the people we work for (an IT manager) gave me an old PC, Monitor, and Keyboard to install it on when he found out.

I still have that comp and it's the "Vectra II" lady I ssh around with (best *BSD box I got too hardware wise). After reading allot of the related matter in the handbook I tried to install FreeBSD at 0400 local, forgot to put my user as part of the wheel group and was to darn tired to figured out how to get to root access. Yeah I know, even for a first timer it was bad but heck I'd have been better doing it drunk then so late/early after a work day. Installed PC-BSD 1.0RC1 in the morning, best thing I ever did.

Since then, I've learned so much, crap I don't even need X after I made my self learn to live in a console. I still hang around the forum in the hopes that as I learn I can help some body else to learn, I don't think I'm half as smart as most of the regulars but I try with the time I got. if it'd give the expirenced users time to anwser some important question I'm happy to deal with simple stuff. If I know it I say it, if I can try or aid some how I try to, if it's some thing the person should'a looked up I try to link them and give them a summery rather then a "RTFM and go away" approch like I've read which I've in some forums but never sceen around PC-BSD. I thank my friend and the author of that page very much. It opened me up to allot of learning, I started out on Windows with C++ and bergined out. It gave me the feeling to start learning other languages even while trying to comprohend the basics (and still am compared to a professional programmer). It led me in search of PC-BSD and freedom, waking up to Windows is like booting up and getting "Good morning retard, care to get bossed around again?" which, is not my idea of design. Any software that thinks it knows more then any user could _ever_ know and that it's omni-portent is a very bad idea. I've always liked to know about things I like and how they work, computers of course have always interested me. Until I got on one much to much it never accured to me a computer could be some thing for joe blow, instead of just Ph.D Rocketman. Some how my interest in programming spread out, I dunno how to explain it. From hardware, to software, to the net it's all a joy. It's just so awesome, to be able to learn. I don't know if I'll ever have enough skills at computers and programming to be able to write any thing useful or really help any one, but I can sure as hell enjoy the ride.

May information always flow freely !

Snakes and Rivers

Starting to learn about python, I've always hated python for as much as I've seen of it. I'm the kinda guy that likes C/C++, not because of the syntax and loaths Java because I feel it's to much typing. C/C++ has a very logical style imho. I'm used to stuff like this:

void someFunction(some, params)
{
      int somevar = 1;
      int comvar = 3;
      char anothervar = "something";
      if (somevar < comvar) {
            cout << anothervar;
      }
}
Python feels more like it'd be some thing like:
def someFunction(some, params):
      """About this function"""
      somevar = 1;
      comvar = 3;
      anothervar = "something";
      if somevar < comvar:
            printf anothervar

So far it's interesting, never really done much for Object Oriented Programming ether. Well inless you count reading allot of Java a long time back but never writting much.
While I can't remember why I got into programming, I remember I chose to start off with C++ because I knew it was common and I could find allot, also I found it interesting. Java I've read but not written, plenty of reading both about the language and the syntax but I've only written like a hello world app. The way I go by how much typing is involved is the Hello world program most tutorials start with. Example / Opinions:
/* ANSI C */

#include <stdio.h>

int main()
{
    printf("Hello, World!\n");
    return 0;
}

// My very first C++ program
#include <iostream>
using namespace std;

int main ()
{
    cout << "Hello World!";
    cin.get();
    return 0;
}

//Simple Hello World program in Java

class HelloJava {
        public static void main(String[] args) {
                System.out.println("Hello Java!");
        }
}

#!/usr/bin/perl
use warnings;

print "Hello, world.\n";

#in python
print "Hello, World!"
As you can see, Python was the least involved to print one line of text to standard output. Perl wasn't so bad, like a shell script + I always use, use warnings with perl. Java doesn't look bad but 2,000 lines later I think my fingers would wear out. C++ is ok but a bit of prep work, C on the other hand is slightly less. While I reckon doing things in a language is always typing intensive up to a point, how much nitty-typing you need to do some thing short is the Q. Odds are in my book Java is probably better to learn first but C is easier to have to type out things. I must say I do like to hear of app's done in Java, I can even read it reasonably like a few other languages but I don't like to use it. I think I'm going to like Python, basically after I started with C++ I got board and switched to Perl learned enough to be able to grasp a few basics (and read it better) then got board. Whent back to C++ studies and started reading about Java. Got tired of C++ and didn't care for writting Java. Forgot allot of crap from no use, got back into it and tried to learn more about C. Fell inlove with it the second I saw this guide it's good for learning basic concepts and this guys got a nice sense of humor. I found it useful if not perfect but it did renew my interest in programming. Since then I've been playing with C and generally enjoying it.

Wednesday, September 20, 2006

Promotion

Well..... I've always been happy even has a hang around, a potential recruit, a recruit, a trooper, and a Lance Corpral /w the mighty [SAS]. Now they've gone and me me a Cpl. I hope I'm worth the faith they've shown.

Dang it now I've got to change all my ID and Signatures!
  [SAS]_Cpl_Spidey01
22nd Special Air Service
  Elite Virtual Regiment

"Faith can move mountains, but it can't beet a
faster draw." - Christopher George, El Dorado.

Our website is here

Monday, September 18, 2006

PC-BSD Quick Guide, draft part II

Continuing my work, I'll get back to the installing applications part soon. I was going to include a thing about using kports but koorts from PBI is too unstable. I might append a pkg_add for portupgade and kports later I don't know yet.

//Heres the next phase

Adding new users

The two best ways to add a new user to your system is by using the User Manager program or the adduser script. User manager is a graphical program and easy to use with the mouse. Adduser is a command line method.

Open the K-Menu and go to settings, Security & Privcary, User Manager. HEre you can add, remove, and lock users, change the super users (system) password). To add a new user you will need to have a user name and password, you may also input the full name of the user for reference.


To add a new user with adduser open a konsole in super user mode and run:

adduser

Here is an example of running the adduser script, the options listed in side brackets are the defualt used when mearly pressing enter to continue.

Username: rs
Full name: ^C
Dixie# adduser
Username: joe
Full name: Joe User
Uid (Leave empty for default):
Login group [joe]: wheel
Login group is wheel. Invite joe into other groups? []: operator
Login class [default]:
Shell (sh csh tcsh bash nologin) [sh]: bash
Home directory [/home/joe]:
Use password-based authentication? [yes]: yes
Use an empty password? (yes/no) [no]: no
Use a random password? (yes/no) [no]: no
Enter password:
Enter password again:
Lock out the account after creation? [no]: no
Username   : joe
Password   : *****
Full Name  : Joe User
Uid        : 1002
Class      :
Groups     : wheel operator
Home       : /home/joe
Shell      : /usr/local/bin/bash
Locked     : no
OK? (yes/no):             

Here we have added a new user named joe to the groups wheel and operator giving him greator access to hardware and the ability to switch user to root, that is run programs as the super user. The choice of shells include the bourne SHell, C Shell and the Bourne Again SHell. More shells can be installed using PBI, Ports, or Packages. You should only add users to the wheel or operator groups that you want to have administrator access to the machine. An example of this would be some one you would give the super user password too, should be in the wheel group. Some one who you do not want to have the ability to switch to the super user should not be in the wheel group!

Sunday, September 17, 2006

PC-BSD Quick Guide, draft part I

Here is a draft of some thing I've been writing. Gotta love vim for text editing, it's actually written in HTML so I'd get a little more used to using it. I know enough html and can look up enough to be able to get around, the only problem is any thing I cook up will have "Designed for lynx" written all over it. I don't enjoy html enough to get fancy with it ^_^

//Start draft

Common tasks

In this chapter we will go over a number of common tasks faced by every day users and administrators. We will discuss such matters using plain english and discribe using graphical user interfaces and the command line interfaces as well as configuration files. This will allow you to chose which method you prefer and to be more productive.

We have broken down common tasks into the following:

  • Installing applications
  • Adding new users
  • Adding custom fonts
  • Downloading system updates


Installing Applications

There are several methods of installing software on a PC-BSD system. Each method will be discribed in more detail below.

  1. PBI Installer, the easy way
  2. Packages, the quick FreeBSD way
  3. Ports, the traditional FreeBSD way

When you install software from a PBI you will be presented with a simple graphical way to install software. Simular to many other popular operating systems you just click and go. Since PBI programs are created from traditional FreeBSD ports and packages they are fewer and less up to date then ports.

Ports and Packages are the traditional ways of installing software. You can get the most up to date software by compiling from ports. You may also quickly install allot software using packages, but not all software is available as a package or PBI.



Installing software via PBI

When you install a program through the PcBsdInstaller system it is placed with all required files in it's own folder in /Programs and linked into the system. This is very simple and safe to the persons system as person is not changed more then necessary to allow the packages to function/*Footnote*/


To install a PBI we need to go to the PBI Directory and download a program


Once the download is completed simply double click on the file to launch the installer. It will prompt you once for the super users password before beginning the installation process. This is to ensure you are installing the program and not any one that may have sat down at your computer. It's both effective as a security measure and parental control.

Click next at the welcome screen, you will then be asked to read any license agreements that comes with the program you are installing. Check the I agree box and click next to continue installation. You will now have the options of placing icons on your desktop and entries in the PBI Programs section of the K-Menu. Check all boxes that you wish done and click install. Once it has completed the installation click finshed and tryout your program


If at a later date you wish to add an icon to your desktop you may do so by right clicking on the desktop..... You can also install in text mode from a console by changing directory to the location of the PBI and run the following as the super user.
./PBI_File -text



/*Footnote*/ Some PBI do modify the base system beyond standard restrictions out of requirment. Examples of this include the Linux Compatiblity layer, Graphics and Audio drivers, e.t.c.



Fetching packages

Packages are prepaired files for installing software, they install software into the system and can cause dependancy issues. The package system is comparable to RPM, Dpkg, and Apt-Get used in several Linux Distros. Installing packages requires you to open a console with root permissions. You can type kdesu konsole in a run dialog from the K-Menu or open a konsole from the K-Menu in super user mode, or open a konsole and type su and press enter. You will be prompted for the root (super user) password, it will nto display the password on screen for security reasons. After switching to the super user account you have complete access to the system and can install software at will.

You can install a program using the package system like so:

#pkg_add -r irssi

will install the irssi with all required files. You can generally find the binary (execuitable) in /usr/local/bin, configuration files in /usr/local/share// or your home directory and the libraries (like .dll) will be placed into the system as needed. This is true for ports as well, the PBI system is favored by users wanting to avoid this at the minor expense of some disk space. As PBI install all files into /Programs/ but ports are kept up to date and contain many more programs

You can uninstall a package by using the pkg_delete command and the name and version of the package or a wild card.

pkg_delete irssi-0.8.10_2 and pkg_delete "irssi-*" are equavilent.

You can get info about an installed package the same way using the pkg_info command.

#pkg_info "irssi-*"



Installing software using ports

Traditionally BSD installs software from source, the ports collection is a easy to use system that makes this as painless as possible. You first need to install an up to date ports collection before you may use ports to install software. New users coming from Gentoo Linux will find this simular to the Emerge system based on FreeBSD ports.

To install the ports collection click on the K-Menu and navigate to settings, administration, PC-BSD System. Enter the super users password to acces the admin panel and click on the tasks tab. Now click fetch ports and it will begin downloading the necessary files and installing them.
This will take awhile depending on your internet connection and Processor speed.


If you wish to do this from the command line open a console as the super user as discribed in fetching packages and run the following command

#cvsup -g -L 1 /root/ports-supfile

You can also use the portsnap method

#portsnap fetch && portsnap extract

If you install ports using portsnap you should not update the ports collection with cvsup, instead use:

#portsnap fetch && portsnap update

if you installed ports using cvsup you may update them in the same way as before:

#cvsup -g -L 1 /root/ports-supfile

You can edit the supfiles and set a download mirror closer to you, please see the FreeBSD handbook for more information on using CVSUP

Now that the ports collection is installed if you look in /usr/ports you will see a simple tree structure of folders. The structure is in the format of catagory, program name.




//end draft

I need to start looking at KPorts and a few other things, I also have some notes in the text but Live Journal treats them as comments just liek HTML, although you don't need any html skill at all to use LJ.

AAO 2.7 Released

Amercia's Army Ops v2.7 has been released in two 1.6gb download parts. A number of bug fixes/revamped UI is expected (I'm looking forward to the situational awareness indicator). Revamped training mission, new vehicles/weapons including Up-Armoed Humvee's, CROWS, AT4 and Javalin weapon systems. + 2 Coop missions.

I was hoping for a better show of Coop so [SAS] could day dream for a realistic game of AAO, but alas most AAO servers I've met team work in Vs. Play is only out of the hunt for more kills. (Boring). PErsonally I like a mission carried out in a realistic manor. I'd rather clear a hostage rescue map with 10 X-Rays then fight may way threw a fortress of 60 enemies.


Player Vs. Player can be fun but is rarly realistic, becahse no matter how much they reenforce realism in Advers gaming. Joe blow turkey can't stand to play as a team and fight like a man if you paid him 2,000,000 points a second. Ever see bunny hoppers packing AT4's or 30lbs packs? (playerswho jump up and down allot in CQB to avoid being shot=Bunny hopper) BF2 was kind enough to make it so they couldn't shoot till they landed, but also made it so you can jump and chuck C4. (My favorite way of using it was to chuck it far over a wall onto an Op4 Pos). In AAO, we have side stepping. You engage a target and the side step to one side out of your LoF, they then side step back *accross your LoF* and magically evade more bullets when they just walked accross your 20 rounds of 5.56x45mm. I was trained you have no where to go, bastardo is shooting at you and your on the run. You move as fast as possible *ahead* of their line of fire. A very fast moving threat at short range can be hard to keep targeted if they are ahread of your LoF, I should know I've done enough Infighting in my time as a MechWarrior (although I was mostly a Sniper or Recon/Harasser pilot). It's also very effective in RvS when you get in a really bad situation or just want to have fun with the instant 1 shot one kill ghost tangos !

Saturday, September 16, 2006

Good training with the Wiz, Blade, the red rooster and some record setting attempts with Wiz, Rouge, and later Leon. About 1:30-2:10 we got on a dynamic hostage rescue. Usually one can do both hostages in about 5 minutes but we figured we'd waltz in :-)


I love to try and beet speed records, I've always tried to be working at a bat out of heck speed in dynamic when ever it's safe since my Recruit tryout. I had a great teacher, Relish. I learned that when the X-Rays know your coming and the hostages live is on the line. You go as fast as is safe, rapid movement, quick shooting, and short desisive violence of action. I'm sure the real world SAS could do it better but we tend to do things pretty well. I wish more teams online played with realistic tactics. In RvS, Coop is a joke on most servers. Generally on public servers people just puff a smoke grenade at the door, camp it and shoot the stupidfied tangos through smoke (Generic player). Totally unrealistic and the moronic way to lame your way through the game.

Smoke grenades are obscurents, not cover or room clearing aids. You puff a smoke to break line of site with the target and you usually don't want to cross right behind it. Any machine gunner with a brain is gonna lite you up if you do. Our boys in Vietnam learned you don't just smoke the street and run accross a killing zone.

A Flashbang is a less then lethel room clearing aid, it's a stun grenade. It blows up with a intense light and a series of sharp "bangs" stunning and or disorienting people. You then poor into the room, size control and get away from the fatal funnel (the doorway) and along the walls for cover and set up the lines of fire to cover the entire room.

Some thing like this should work
____________________
|                <<|
|                  |
|                  |
|             b    |
|^      ^        <<|
|^______^______d___|
d = Door openning
b = Bang landed
^/< = Assualters

Basicly the idea is you cover the whole room, keeping to corners/walls and you _do not_ have any one standing in the line of fire of anothe teammate. As you can see in my little diagram 2 assualters have the 12 o'clock and the 4 o'clocks general directions covered, they are along the walls (but not touching) so they won't get flanked and shot in the back.

Now of course in real life a flashbang will hurt you if it goes off to close, in Swat4 it's able to setoff pipe bombs on a shelf if it hits but doesn't really do any damage. In my work for a mod for the game a flashbang going off on you will hurt allot, but it won't kill (generally) which adds a bit more realism. In our games as long as Me, Fury, and Glock are not tossing the grenade your safe enough. I guess it's what I get for not liking base ball as a kid, my stingball grenades tend to bounce back at us. (even virtual ALSG101 stingers hurt).

I love our PC Games because it gives us a chance to use tactics, we don't "Smoke and clear" we "Bang and Clear" as a standard entry in dynamic. We do of course use Breaching Charges, Frags, Gas and Shotgun breaches alone and in combination but getting it doen safly can be a challenge. In SWAT4, allot of times I see pub's stack up and say "Oy, that one is probably gonna die when the door opens". Oh well would be nice if they'd learn linear and Column stacks and how to safly stack up. As we always tell the recruits when their training to join the clan. "Stack on the side of the door that will not expose you to immediate return fire when the door is opened" we also use Linear stacks most times, every one in a single line. #1 goes in, #2 goes in, #3 goes in, #4 goes in e.t.c. The idea being you don't get #1/#2 on the left, #3/#4 ont he right side of the door. And then have #1 going in the room with his pants down while #2 and #3 are jammed in the door, both trying to get in because of lag or one being to slow. You want to get in quickly and safly !!!

I've seen to many 5 man pile ups at the door with public players. Hahahha I remember once after me and a team mate we're harping on not clogging the door. My teammate the point man went in, #3 jumped me (I was #2), and #4 was trying to push us through the darn door while #5 fiddled. #1 was alone in the room and got flanked & downed, I got in and moved out. My team mates did the same thing at the next door with me as #5 and I was the only one to survive and complete the mission. Now if only SWAT4 was like RvS where idiots get shot fast.

Friday, September 15, 2006

I'm beginning to see how PHP and Javascript can have their uses...

I'm considering putting composer to work, I like vim for it's speed and power, Kate for it's omni-tasknisque nature (not so much for html in less you always use text browsers =P ). Composer and Nvu I like because I can quickly see things without having to alt-tab to my browser and refresh it. Yeah I can get lazy at times.

Been breaking in Seamonkey good and trying to get work done. I had very much fun joining my teammate Rasa in training with a few recruits. One or two people would hide in a room and play the part of X-Rays while the rest setup for entry. At first we used light clicks to simulate shooting but it was to hard to keep track of who shot at who and was to dark to see if any one surrendered. So I suggested we switch to gas masks and SA-200's loaded up with Pavaballs. We really had allot of fun and I got to help Rasa. The two things the recruits seemed to have the most problem with was trying to get the flashbang in a sweet spot to cover their entry good and checking behind the door.

You see, #1 has to check behind the door if there is no imediate threat to the team because if theres a threat not clearly visable it might very well be behind the door waiting to kill your mates. Lazko was especially peppered for not checking behind doors. I hid near by the door in a crook between a freazer and a counter. They opened the door, chucked in a bang. Now of course being a simulation (SWAT 4) I wasn't stunned with the door and a set of ear plugs between me and the NFD . I closed the door before they could get in, they popped it back open and rushed in not checking my hidy hole. I peppered the day lights out of them xD

Ahh, tomorrow I'm off well.... I've got training with Wiz, En4cer, and Blade but that should rock as long as my mom doesn't crash it. So, theres no reason to get out of bed early other then to walk the dogs. I think I'll hit the servers and start working on my room clearing (Swat4) or on toes tactical thinking (RvS).

Thursday, September 14, 2006

note to self

Some quick links I need to study later (mind joggers)

http://www.w3schools.com/html/html_formatting.asp

http://www.w3schools.com/html/html_tables.asp

http://www.w3schools.com/html/html_lists.asp

http://www.w3schools.com/html/html_forms.asp

Top level
I don't know whats worse, having to go to work in 7 hours or not having enough time to finish my own work.

I've installed Samba on Vectra, but I expect she will still give me problems with the printer. I can deal with that later. I thought, for my needs I could setup anonmous ftp on the box and skip samba [and the printer :P]. But then, what fun would that be ? Hehe tooo easy. The last time I got to toy /w setting up Samba to share files to a Windows box I got as far as being able to find the server, but I never had the time to setup the authentication hahaha.


Working hard may be work but working out of love can be fun as all getout.

My work can be very stressful, some times even leg [or back] breaking but it's only 4-5 days a week School, well I'm home schooled and have loads of it so theres no such thing as time off without a price [Weekends included]. Yet, I enjoy computers so much, sure it can be a pain in the royal hind quarters. Non-sensical problems especially - I still have no idea what happened with my router, but s'ok if it works, we figure out the mystery in time. At least, here I'm free to be me, a console doesn't try to control you Unix lets you define yourself.

Windows, I leave behind tried of being confined. PC-BSD and FreeBSD I take up in joy, a new toy to tinker with maybe but it's passionate. The more I learn and the more time I spend working with computers [and wishing some one would pay me to have such great fun:D]. I find my self enjoying it too much. If I have nothing to do, nothing to learn, and nothing to eat to boot I'm deffo in trouble. What point is their to life if you don't get to enjoy the simple things in life?

Now if only that dream vacation was possible.....
Well I think I'm doing it. I'm switching to Seamonkey. To me it's no point to use a diffrent program(s) for the same thing(s) just because it's a diffrent operating system. Good programs are portable programs in my book and play nicly.

For Windows I've been using Firefox, nice browser and much more fun the Internet Explorer 5~6 was, althouhg I'm interested in seeing the changes in IE7. The only catch is I prefer Opera. While Opera is very nice and has awesome tabbed browsing support, good enough that I don't mind a few quirks in it. The windows version of Opera is not so hot, on my system it also chews CPU time but rocks for BSD. Soo, I've returned to my old consideration.

I'm very adapt to Firefox and I use Thunderbird. Mutt I was hoping to learn but I don't think it's worth the trouble for the win32 port of Mutt. Konqueror is very Firefox like, lacks some of the extensions e.t.c. but is a great browser but doesn't runon Windows. Since it's a KDE app, it's also a bloody nice file manager compared to explorer on Windows XP.

Seamonkey is the successor to the Mozilla application suite, which was kinda like Netscape Communicator on steriods you could say. (Netscape was before my time, we only got inet access around 2000). When the kitchen sink got EoL'd [End of Life] so they could work more on Firefox and Thunderbird the community picked up the app and she was reborn as the SeaMonkey [which Mozilla suite was code named Seamonkey]. It provides a browser (navigator in a very netscape like feeling) which is basically firefox, Mail/newsgroups (thunderbird for all intents and purposes), Composer a WYSIWYG html editor which I like for testing pages quickly [Nvu is basically an extended version of this], Adressbook, Chatzilla IRC client (Mmm maybe I'll lay off X-Chat), plus a DOM inspector and some JavaScript stuff.

The mbox is the same as thunderbird so I can just point mail & newsgroups at my thunderbird local folders on my Lexar, no need to import. Plus SeaMonkey has Roaming support that lets me keep bookmarks/addresses/cookies e.t.c. sync'd the support is expiremental so it's not very good but it seems a good start. Load times not much a bother on my desktop thanks to fast CPU and 2GB of reasonably fast DDR2 memory but on my laptop it's a little slow. My latops got 512mb DDR and I run so much crap along with KDE 3.5.x that I use most of it but the system is still more responsive then windows under lighter loads for me, on the same machines. The program works great on my laptop, it's just a little slow to start up. I suspect it's because it takes awhile to load all the dep's.

Pros:

Very good intregation
Open source
"Modren" theme is nicer compared to "Classic" theme or the generic Firefox/Thunderbird ones (same thing).
Most Mozilla Suite addons should be compatible
No E-Mail import needed for thunderbird users
A nice editor for web design [at least for when I'm lazy]
If it had an AIM/MSN/Yahoo/X-Fire client and a sweet PIM in it it'd be a very full web application suite imho.
More standards complient then Microsofts I.E. but not as complient as Konqueror or Safari.
Roaming support

Cons:

Takes a while to start on older machines
Uses a fair amount of memory when using allot of tabs/componants e.t.c. [just like Firefox]
Not every one may need all the features
Roaming support is not finished
Can't right click on bookmarks in menu [have to open manage bookmarks]
Support is in the hands of the community, updates may take longer then Firefox/Thunderbird/Misc

All in all a very nice system, I figure I use Thunderbird and fire fox works ok for me (I prefer Opera but not Win32 ver) so the thing fits me well. I commend Mozilla for having created a kitchen sink and then deploying parts of it independantly so people could just use the parts they like if they don't want every thing. [Mixing Firefox and outlook express comes to mind].

Wednesday, September 13, 2006

Die Cupsd, Die !

Well I tried every thing I could with cups-1.2.2 on the box with no luck. Hooked it up to my laptop running PC-BSD and cups 1.1.x and got a nice test page.

I tried to install cups 1.1.x with little luck, so I ripped every thing off the box (packages) and reinstalled cvsup-without-gui and fastest_cvsup (which added perl5) to sort later. I'm telling you I'd rather toy with arcahic UNIX printing, at least for that I've got enough books all ready about. Although most people dealing with lp/lpr tend to cringe I think hehe.

Comptemplating switching from firefox/opera + thunderbird to Seamonkey. I really like the F.F. UI, but Opera (not win32 version) has awesome tabbed browsing. My favorite browser is generally links for text but lynx dispite oh most no page layout is still the best in my book. Konqeror is by far a supurb program. I wish Internet/Windows Explorer was that good. Konqueror is also allot like fire fox in the UI so it's easy to use, but why bother using Konqi on *nix and F.F on Windows? Any more then Opera/F.F.

Oh well, off to tinker for the night with browers. A good toy indeed, after all I sorta collect them.
I was thinking today at work, besides a jab about bill gates, a zealot in a penguin suit, and a Gnuodle trying to mish mash a MS marketed distro of Linux kernel and Gnos [GNU-DOS], Gnos is Not an Operating System. While a pufferfish works on improving the worlds most secure OS [OpenBSD] and then they disiding to sell OpenMSD instead hahaha. Ok back to my point.

I figure, if we should break up a problem into smaller pieces when working on a program, why not read it the same way? Last night I started reading some of the source for the "cat" command used by *BSD. The main function basicly sets up the data and desides on how to cook it.

To night I work on breaking apart the next function and some homework for SAS.

Tuesday, September 12, 2006

Well about 0320 UTC and whats possibly the 9th issue to warrient being dub'd a "WW" here seems to have gone to cold war status.

I'm alive, and I'm not worried about any one going silcian on me (tonight). Things seems to have calmed down, time to release some stress in the virtual shoot house.

Off to training.
Life sucks when you expect a loved one to stick a knife in yoru ribs at any sec, got trop'd lightly, not what I expected but expected some thing to hit.

Dunno whats more fsck'd up, to think that she'd kill me, or worry she'll get a stroke screaming.


To night I think I sleep armed, my prefered self defense weapon near by. (Light sabre for sword practice.) It's got allot more punch and range then bare hands if I need to disarm some one in the dark, without getting injured.


I know I'm far from the perfect son, surly I'm rotton enough at times but I'm not a target to for some one to vent rage on for lack of a more appealing outlet to a problem (even if I'm related to the issue). Life is just, fsck, crap. I wish my family didn't have such a knack for anger... sheesh I can't hate some one for more then 10 seconds and if I want to hate longer then that I feel like a disgrace to GOD. These people, can thrive on it.

Anger, fear, hatred, a dark road. I reject it and all it stands for. Only one person has a right to take my life, and that is Jesus Christ and no one is beeting him to the punch imho. This war, is not one I asked for but it's one I must stand warry to parry.

Note to self, prep a emg escape and evasion route, back woods might be good. I'd be blind as a bat but it's thick enough to stop pursoot. Don't think I'll ever need it but it's always good to plan for worst.

TMPS01, 2006-09-12 @ 2434 UTC.
Life sucks when you expect a loved one to stick a knife in yoru ribs at any sec, got trop'd lightly, not what I expected but expected some thing to hit.

Dunno whats more fsck'd up, to think that she'd kill me, or worry she'll get a stroke screaming.


To night I think I sleep armed, my prefered self defense weapon near by. (Light sabre for sword practice.) It's got allot more punch and range then bare hands if I need to disarm some one in the dark, without getting injured.


I know I'm far from the perfect son, surly I'm rotton enough at times but I'm not a target to for some one to vent rage on for lack of a more appealing outlet to a problem (even if I'm related to the issue). Life is just, fsck, crap. I wish my family didn't have such a knack for anger... sheesh I can't hate some one for more then 10 seconds and if I want to hate longer then that I feel like a disgrace to GOD. These people, can thrive on it.

Anger, fear, hatred, a dark road. I reject it and all it stands for. Only one person has a right to take my life, and that is Jesus Christ and no one is beeting him to the punch imho. This war, is not one I asked for but it's one I must stand warry to parry.

Note to self, prep a emg escape and evasion route, back woods might be good. I'd be blind as a bat but it's thick enough to stop pursoot. Don't think I'll ever need it but it's always good to plan for worst.

TMPS01, 2006-09-12 @ 2434 UTC.

Monday, September 11, 2006

Captains-LOG.c

Well, just so I don't forget if I frag it later heres the write process of my logging program (still working on).

It's pretty simple, just get input till we get a return char, then write it into the file and append a newline. The only bugger is that the input has to fit into a char array of 256, any attempts to modify this to what is needed has returned junk pointer warnings in realloc at run time. I'm still a newb whose trying to learn the standard library and more so simple code is probably good.

if ((rflag < 1) && (tflag < 1) && (fflag < 1)) {
 char str[256];  /* this is enough space for our needs */
 fscanf(stdin, " %[^\n]", str);
 fprintf(fp, str);
 fputc('\n', fp);
 fclose(fp);
}

I figure one or two lines of text is what is most likly to be written to file, so str is big enough yet small enough for right now.

Un till I have the time, chance, and enegry to learn how to handle reading the file and printing it out to screen in a head/tail like fashion. I'm just having a system() call to invoke head or tail as needed on the file. /usr/src/bin/ cat, head, and tail are my current points of study for methods. Cat looks the easiest to follow but means I have to work on it when I have time to consintrate on the flow of the program.

This is also a test to see if the html pre tags work the way I'm hopping they do, since I don't know allot of html to start with. It's just never interested me very much [xhtml/css/php/e.t.c.]

Sunday, September 10, 2006

I hate not being able to sleep...

My work load piles up, theres always more to do tomorrow then there is today. I usually have to be up early to walk the dogs and get them squared away before work. So sleeping in's not a big option.

My mind always wonders about, from thought to thought it just can't shut up. I can be thinking of any thing from a programming problem, a good movie, food (a killer), or even some thing more interesting. I don't want to sleep because I don't want to think all night, yet I want to sleep because I can't go any further with my things to get done.


Theres got to be a better way...........

Saturday, September 9, 2006

I did a custom install using only the base system and GENERIC kernel, later I installed the man pages rather then swap around. Partitioned the drive [ad0] into one large slice [ad0s1] with a 256MB partition for /var, a 256MB swap partition giving me 7.1GB for a root partition. I didn't see a need to split /usr off of / on such a small system. It was cool not to have many packages installed after using PC-BSD and FreeBSD on my desktop. I quickly setup a text based web browser and cvsup tools via pkg_add.

pkg_add -r lynx
pkg_add -r cvsup_without_gui
pkg_add -r fastest_cvsup && rehash

I used fastest_cvsup to check what the best mirrors would be for getting a current copy of the system sources. Usually I'd just zip it over on a USB stick but my local tree was out of date.

fastest_cvsup -c us

tested all the US mirrors and showed me the fastest ones, I copied the example supvile over to my root directory and set the mirror. [#cp /usr/share/examples/cvsup/standard-supfile /root/]. A quick cvsup [cvsup -g -L 1 /root/standard-supfile] later and I was ready to update the machine. I checked out the make files, the FreeBSD handbook and the text files in /usr/src. I issued the make buildworld command and let her compile for about 5 hours. I then did a make buildkernel and it failed, I removed /usr/src and did a freash cvsup, tried again and failed again. Built a kernel using an alternate method discribed in compiling a custom kernel. Installed the kernel, dropped to single user mode and ran a make installworld. Life was good but the system still showed the wrong patch level, probably because the un updated kernel was running in memory :)
A reboot fixed that, tested things to make sure the system was working and no problems with commands not working right. The kernel was made /w sources downloaded a day after world. All was fine

rstf@.launchmodem.com-%uname -a
FreeBSD .launchmodem.com 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #0: Mon Sep 4 22:48:50 EDT 2006 root@.launchmodem.com:/usr/src/sys/i386/compile/GENERIC i386

I'll setup hostname/custom kernel later and keep tabs of the security mailing list. Since then I have installed porteasy and the ports tree. I checked this link for some advice and isntalled gnu ghostscript via package, I checked on the ftp server to make sure I could get it without X11 support.

pkg_add -r ghostscript-gnu-nox11
I then built cups via porteasy -fb print/cups and took the night off.

I've still got to get back to setting up the printer but I've all ready begun on the configuration files. My primary goals for right now is to get the printer working and a custom kernel ready. Then I play with packet filter [pf the openbsd firewall] and tighting security. I'll post more of my changes later since I have them logged.

Vectra II

Today I post a history and a log of my oldest computer here.

When one of my employers (who works in IT) found out I wanted to run FreeBSD but my mom wouldn't let me repartition her computer (which we shared). He gave me an old office computer, keyboard, and monitor and I bought a Microsoft Basic Optical mouse for it. It gave me my first expirences with FreeBSD 6.0 and PC-BSD 1.0RC1-2. After PC-BSD made it's 1.0 release, breaking upgradeability (via easy install patches) with the beta releases. After I got a new computer which runs XP and BSD, the machine sat more or less just for a way to quickly check system files or man pages when I needed to look some thing up.

After some time I tried installing NetBSD 3.0 on it, nice system but it just felt wrong after using FreeBSD/PC-BSD so much. So I overwrote it with a large install of FreeBSD. Just incase I might need to fall back to it I setup Xorg and Windowmaker. I wanted to set it up with Samba/CUPS so I could print form it and store some files on it. I never got a chance to finish samba config and the install burned most of the HDD. A few weeks ago I reformated with a bare bone install of FreeBSD 6.1-Release with the intention of learning more about system administration and security. System Specifications:

Model: Hewlett Packared Vectra Vli8 500
Processor: Katmai core, 500Mhz Pentium 3
Memory: 384MB DDR RAM
Storage: 8GB Maxtor IDE drive
Extra: 1 x CD-ROM drive, 1 x 3.5 1.44MB Floppy drive

Friday, September 8, 2006

Source madness

I've been working on a logging program, it's nothing much but it's good learning fun, usually...

She basically deals with command line options like so:
while ((ch = getopt(argc, argv, "rchtf")) != -1)
        switch (ch) {
        case 'r':
            rflag = 1;                /* read log, like tail */
            break;
            case 't':
            tflag = 1;                /* read top of log like head */
            break;
        case 'f':
            fflag = 1;                /* log to a diffrent file */
            break;

When ever a switch is "On" or "1" we perform an action. When no switches are given we fscanf stdin into a str[256] char array. This is more then enough space and shouldn't be to memory hungry for right now. Input is taken until a new line is given then we store it in the char array and fprintf it into our logfile + a newline. I toyed around with trying to resize str to match stdin should str be to small, so we could avoid a segfault when trying to write huge entries. Yet allow no major limit on entry size. That nett'd me a good junk pointer warning I'm sure not able to find out all the details of.

Right now I'm working on trying to get the t switch working using the source for the head command as a reference. So far no real luck, we never get any output from it. It seems to break apart in the line of execuition so I know I've got to change things around.

I know I could just pass things along to head and tail via sh, but what is the fun in that? I'll figure this out later must sleeeeeeeeeeeeppp!!!!

/* I don't do HTML ! */
Ok time to inhale the manual

Day one

So far LJ seems a nice site, maybe I should replace my logging files with it. I'll try to keep my blog orderly but I'm not the most structured person hehehehe.

Primary subjects: Computers, Programming, BSD and Unix like operating systems, trials and tribulations in my studies and learning of computers and technology. And life as a working schmuck and JNCO of one of the best Coop teams to ever play SWAT/R6.