The day rolls on

Well I’ve finally gotton ntpd working the way I want it, I think. My laptop is showing Vectra as a peer in ntpq. As to SAL1600, windows can’t nativly talk to ntpd on unix without a kick in the registry AFAIK. So instead of hacking apart my registry I’ve installed nettime after reading an article. It’s an abandonded project but I’m lazy.

I installed nettime and set it up to start the service at boot and use my time serving machine Vectra. Since I run a firewall on Windows that is set to block any thing not matching a rule, I made one.

WARNING: low qaulity 1600×1200 Jpeg

I need to setup ntpd on Ubuntu and run a tcpdump in less I can find an equivulent for Windows XP. This fire wall rule will do for right now and I can edit it later if I find I need to.

Waiting on a full scale distclean of my ports collection on Vectra and a du after that. On the 15th Vectra dropped off the lan , was totally dead to the world in regards to the network. After work when I got back to the computer I unplugged the router for a short count of twenty sec then replugged it in. Five minutes later when I got back to my desk I powered Vectra up and she recived her DCHPOFFER from the router. Interestingly, a post I made about it on a forum I vist ocasionally the first reccomendation was what I was affriad it would be the ol’yank, wait, plug the router bit. Awhile after posting that it solved the issue the forum owner posted this:

“I should’ve elaborated my first answer when I said “reboot the router” unplugging it is the best way because it clears the excess voltage in its capacitors which causes invalid data in its memory therefore the router will not function properly! Good on you TerryP!”

I find this an interesting idea, I can see how excess voltage in the capacitors could be aproblem for it’s memory (all 8MB of RAM and 2MB of flash memory of it). What I don’t get is why it should be neccesary to flip a device on/off, why not design it to deal with it or some thing? Eh maybe I just don’t know crap or it was made by a Windows fan.

I’ve been fooling with ntpd allot, if I’d stop editing the file maybe I could be sure of my configurations hehe. I keep the below blog entry fairly up to date.

Installed the PC-BSD 1.3BETA1 on my desktop heres a copy of the notes I wrote myself before posting on PC-BSD.

Notes:

First installer screen needs to say KDE is a DE not a WM, it will confuse people.

Installer didn’t allow an option toggle autologin.

Glad to see installer says PC-BSD not FreeBSD in the ASCII art and boot menu which is also used now at boot up. < I never did a 1.2 install so I wouldn't know if this is new or not. Installer detected my SATAII (ad0) drive and some free USB ports (da0-3). Drive layout was 180GB NTFS (WinXP), 79GB Ext3 (Ubuntu), 120+GB Freespace, Extended partition /w 4 logical drives (linux swap, home, and backups) Partitions detected right, NTFS, EXT3, DOS Extended. -> Didn’t detected my freespace ! Rebooted and manually fdisked me a UFS2 slice to use.

Installer doesn’t make it clear in the adv. Setup if PF will (if it needs to) be configured accordingly if you choose to use NTPD.

Installer could use tooltips.

Using the quick guide pressing “Index” in pages sends you to /PCBSD/docs/guide/ on the FS not /PCBSD/docs/guide/index.html (Time for a sed script)

Icon setup is great opens the right profiles to, only the “Start” Menu should be named some thing less Windows like and more consistant with the documentation that refers to it as a “K-Menu” -> We don’t need confused people saying “Whats a K-Menu” and it’s probably patented by Microsoft or Apple.

The pictures in the quick guide do not match the window decore, K-Menu, or Panel of the actual system

~/looks good, although some sample images and/or a PC-BSD_theme_song.ogg would be nice as would be a Video interview with the dev’s talking about the system. All in the right dirs of course.

There should be a fairly consistant (simular) rc file for each shell. (sh, csh/tcsh, bash). It should at least set the same basic env vars and the prompt.

/etc has a few .bak files and shells only shows bash by it’s symlink in /bin not both /bin and /usr/local/bin.

The “Start” menu looks nice but is a bit scrungy looking, the PC-BSD side img that used to be used /was/ nice tho

nice to see GTK 1.2 and 2.8 installed along with gtkglarea and python bindings. gtk-qt-engine+ Control Center entry -> Nice !

Noticed the new style lipstik used, PCBSD style should be renamed PCBSD Classic or v1.2 or something. I like what you’ve done with the Crystal windecore, think I might clone it to my lappy next time I change my windecore.

I wish KDE would fix the Component Chooser. (installed version is 3.5.4)

ruby, portaudit, portupgrade are installed among the 255 pkg’s (including a pair for the KDE style/windecore).

I see ispell is setup in KDE but pkg_info | grep spell only returns aspell dunno if thats right or not.

I get a default resolution of 1280×1024 just like in Ubuntu, I call it the “livable” res since I prefer 1600×1200 or larger + large fonts xD

Would be nice if NUMLOCK was turned on automaticly when booting a Desktop. It’s kinda expected.

Printers section gives an error

root has a pair of msg from june and the MOTD is still FreeBSD

PCBSDv1.3 conf still references itself ontop as the GENERIC FreeBSD conf. It’s set for machine i386 and cpu’s 486-686.

There is no sound drivers being loaded in my loader.conf. Usually FreeBSDs OSS doesn’t notice my audigy4 and I have to install the emu10kx driver. On Ubuntu ALSA can use it with the included standard driver (emu10k1 I think, or maybe emu10k3).

paths should be set to automatically have the users “Documents path” set to /usr/home/${USER}/Documents since you give them a dir for it.

There are no help items for the PC-BSD related Control Center entries. This is more a standard policy imho for PC-BSD. Want help? Get GNOME, want functionality? Get KDE !

I think the menu editor might be fixed finally !!!

Launching KDE reports it can’t find the codecs or libdvdcss since they are in the Essential Codecs PBI.

It also reports “DVD Drive” Can’t check DMA mode. Permission denied or no such device: “/dev/dvd”

I hope 0.8.2 fixes the stability problems in 0.8.1 (PC-BSD v1.2)

The X config file is XF86Config but we still use Xorg 6.9

Some interesting changes in /PCBSD/cardDetect which appear to come from RoFreeSBIE

__________________END___________________

Really I think they are making an improvement, I just don’t care for what they have done with the K-Menu. Also for some odd reason Keramilk, crystal, and polyester window decore keeps coming back to me.

NTPd

Well, today I noticed my windows machine was running 39 minutes past the hour, my freebsd machine 37 minutes past the hour (SAL and Vectra respectivly). I sync’d SALs clock with the defualt server and found my bsd box behind. Origenally I set the CMOS clock on Vectra to GMT time using my wristwatch, so a few min off after a month isn’t bad.

I’ve desided to run ntpd (network time protocal daemon) on Vectra and use her to sync my other machines with. After a little researching I found out my ISP has a ntp server so I’m using that. The NTP daemon should come preinstalled on a FreeBSD box, it’s also in ports if you need to update it without the whole computer. Since my ports tree is up to date and I need to update the system and ntpd takes less time to compile then FreeBSD this was my method of making sure it was up to date.

#cd /usr/ports/net/ntp && make install clean

That netted me ntp-4.2.2p3 which should be fairly current. Running portaudit tonite has showed me that python, ruby, and pgp have issues. Checking for outdated ports:

Vectra# portversion -v | grep "<"
fastest_cvsup-0.2.9_3 < needs updating (port has 0.2.9_4)
portaudit-0.5.10 < needs updating (port has 0.5.11)
portupgrade-2.0.1_1,1 < needs updating (port has 2.1.3.3_1,2)
ruby-1.8.4_4,1 < needs updating (port has 1.8.5,1)

Gotta love portupgrade giving some nice tools, gotta do some updates over the weekend of course. The NTP daemon is pretty simple, all the compucated stuff is basically done for you by the program and Network Time Protocol. We need to create a configuration file, being part of the system it’s in the et cetera directory of the root file system (/etc). The only editors installed on FreeBSD I know of are ed, ee, and vi. Ed was the first unix editor I think and probably would be a good choice if your using some type of telitype terminal, for the sake of ease of use I suggest you use ee or vi. PC-BSD and DesktopBSD should include kwrite, kedit, and kate, xedit as well. I personally prefer vi as it’s vim like (funny as vim is supposed to be vi like 😛 ).

Vectra#vi /etc/ntp.conf
#Simple ntpd configuration for Vectra

driftfile /var/db/ntpd.drift

server ntp.bellsouth.net version 2

#Broadcast NTP signals over the LAN
restrict 192.168.1.255 mask 255.255.255.0 notrust nomodify

logfile /var/log/ntp.log

Like many config files and a fair number of scripting languages any use of “#” is a comment. To explain NTP quickly. You have a clock, like all clocks your lose accuracy as time goes on. Infact my wristwatches manual stats that it’ll gain like 0.001 seconds a year. I’m not the most tech-headed person but I’d reckon a machine that’s not up 24/7/365 a year is going to be less accurate them my watch. So we need to “syncronize” our watches to do that we need some thing to sync to, thats where time servers come in. A primary time server should be hooked up to a decent time source, like an atomic clock or GPS gizmo e.t.c. and filter down through things, need less to say primary/secondary time servers should be fairly accurate and NTP takes into account trying to keep it that way between systems. The configuration file specifies my ISP’s time server using the syntax “server Server_To_Sync_With”, you need to query at least one server, two is more reliable but you should be considerate of the server maintainers. The driftfile is used to help store information to keep accuracy of the time. The server is limited to broadcasting on the given LAN with several options (taken from the man page). notrust Treat these hosts normally in other respects, but never use them as synchronization sources nomodify Ignore all NTP mode 6 and 7 packets which attempt to modify the state of the server (i.e., run time reconfiguration). Queries which return information are permitted. We can start the daemon now using the command:

Vectra#ntpd -c /etc/ntp.conf -f /var/db/ntpd.drift

To get this setup at boot time we enable ntpd in /etc/rc.conf, edit it as root in your editor of choice. Add ntpd_enable=”YES” and ntpd_falgs=”-c /etc/ntp.conf -f /var/db/ntpd.drift”, below is a copy of my rc.conf file including the ntpd lines.


# -- sysinstall generated deltas -- # Sat Sep 2 19:29:45 2006
# Created: Sat Sep 2 19:29:45 2006
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="Vectra"
ifconfig_xl0="DHCP"
saver="daemon"
sshd_enable="YES"
usbd_enable="YES"
update_motd="NO"

#Services

#enable CUPS
#cupsd_enable="YES"
#background_cupsd="YES"
#boot samba
#samba_enable="YES"
#enable ntpd
ntpd_program="/usr/local/bin/ntpd"
ntpd_enable="YES"
ntpd_falgs="-c /etc/ntp.conf -f /var/db/ntpd.drift"

#Security

#clear temp files
clear_tmp_enable="YES"
#Make sendmail listin only on the local host
sendmail_enable="NO"
#Ignore ICMP redirect packets
icmp_drop_redirect="YES"

I’ve organized it in the form of things that came standard, services, and security for now. To sync my computers with Vectra I’ve to set them up to use ntpd with the FreeBSD box as the time server. If you’ve got to sync multiple machines you should use one as a local time server and sync the others on it rather then say ask your internet time server for the time 10 times ! Also you can use ntpdate timeserver for a one time update instead of running ntpd on the clients.

Ok, I think I’ve accidently not done my history test enough, time for bed I’ll worry about getting windows clients syncing off it and the box updated tomorrow !!!

PC-BSD Quick Guide

This is the draft I sent in for the PC-BSD Quick Guides 4th chapter, I’ve replaced my HTML Comments with C Style /* Comments */

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 describe it 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.

  • PBI Installer, the easy way
  • Packages, the quick FreeBSD way
  • 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.

/* Update the URL if it ever changes */

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

/* Stick screen shot(s) of PBIDir here */

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 may have the options of placing icons on your desktop and entries in the PBI Programs section of the K-Menu. Check all boxes that apply to what you wish done and click install. Once it has completed the installation click finished and tryout your program

If at a later date you wish to add an icon to your desktop for some thing you did do during a PBI install, or when using ports/packages you may do so by right clicking on the desktop and selecting “Create new link to application”. This will open a menu where you can set thename of the icon, it’s picture (click the cog image), click the Application tab. Here you will have to set the program you wish to create an icon for, you can also set a comment, disrisption, work path, and file types as you feel necessary. 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

Fetching packages

Packages are prepared 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 program with all required files but not update the K-Menu or desktop. You can generally find the binary (executable) 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 and shared between applications. 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.
/* Special thanks to adamant1988 on #pcbsd for coming up with the package. I don’t think a CLI IRC client is right for this but I needed a quick program thats not a PBI yet */

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 GNU/Linux will find this similar to the Emerge system which is 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 access 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.

/* picture of the tasks tab here */
/* Probably delete this part for the quick guide */

If you wish to do this from the command line open a console as the super user as described 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.


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 very flexible command line method.

Open the K-Menu and go to settings, Security & Privacy, 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.

/* Insert screen shot of user manager */

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 default used when merely pressing enter to continue.

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, is someone who 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!

. An example of this is a child you may not want to be able to modify important files should not be in the wheel group. While a spouse you wish to be able to install software should be.


Adding Custom Fonts

To install additional fonts that you have downloaded from the Internet. Open the K-Menu and go to Settings, System Administration and click Font Installer. You can install personal fonts for use with your account or you can install fonts to be used system wide. Only the super user can install system wide fonts.

/* Screen shot of font installer, admin mode */

To install a new font click add font and locate the .ttf font file you wish to add. If you click administrator mode you will be prompted for the super user or “root” password. Then you will be able to view and add system wide fonts in the same was as personal fonts. The font installer program only shows you fonts installed for yourself when not in administrator mode.


Downloading System Updates

Updating a PC-BSD system is a very simple process unlike many GNU/Linux distributions, PC-BSD is updated in a similar matter to installing software using PBI. You can check if your system is up to date by running the Online update utility.

Open the K-Menu and browse to Settings, System Administration and click Online Update. It will prompt you for the super users password before allowing you to alter the system. You will have the option of setting the system to check for updates at a specified time daily or weekly, default is not to check. However the system will always check for updates at startup and you can manually check here by clicking “Check now”. After editing any settings here be sure to click the “Save” button to save your changes. You will then be able to select, fetch, and install any updates it finds.

/* Screen shot of Online Update */

To manually download an update go to www.pcbsd.org and find the download system updates section (under the downloads menu on top of the site. As of this writing you can obtain updates from here. Download the patch for your version, such as PC-BSD 1.11a to 1.2. Once the download has finished double click on the PBI file to begin the installation, it works just like installing a PBI but simpular.

DO NOT cancel the update while a patch is running, restart the computer or other wise disrupt the update even if it appears to be stalled, an update can take time to complete. You will be notified when the update has been completed and be asked to reboot for all changes to take effect.

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.

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

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.

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

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!