Monday, March 31, 2008

Linux DHCP Server Configuration

Dynamic Host Configuration Protocol (DHCP) automatically assigns IP addresses and other network configuration information (subnetmask, broadcast address, etc) to computers on a network. A client configured for DHCP will send out a broadcast request to the DHCP server requesting an address. The DHCP server will then issue a "lease" and assign it to that client,more..

Saturday, March 29, 2008

Protecting SSH Servers with Single Packet Authorization

To begin, we require some information about configuration and network architecture. This article assumes you have installed the latest version of fwknop (1.0.1 at the time of this writing) on the same system where SSHD and iptables are running. You can download fwknop from www.cipherdyne.org/fwknop and install either from the source tar archive by running the install.pl script or via the RPM for RPM-based Linux distributions.read more...

Perl : Writing Extensions in C with Inline::C

Inline::C was created as an alternative to the XS system for building C extension modules. Rather than jumping through all the hoopla of h2xs and the format of an .xs file, Inline::C lets you embed C code into your Perl program. There are also Inline modules for Python, Ruby, and Java, among other languages.
By default, your C source is in the _ _END_ _ or _ _DATA_ _ section of your program after a _ _C_ _ token. This permits multiple Inlined language blocks in a single file. If you want, use a here document when you load Inline. more...

Friday, March 28, 2008

Manage Debian Linux SysRq over network Using sysrqd

Sysrqd is a tiny daemon aiming to control sysrq over network.SysRq stands for System Request, and this are functions mapped to keyboard shortcuts by the kernel. You can use them by pressing Alt+SysRq+[key] (SysRq might be named “Print Screen” on your keyboard),Permits to execute usual SysRq commands by network, like: sync, umount, reboot, poweroff, sak, term, etc. where key can be s (sync), k (sak), 0 to 9 (logging level), b (reboot), etc. read more...

Linux Terminal Server Project

The LTSP provides a simple way to utilize low cost workstations as either graphical or character based terminals on a GNU/Linux server.
In a traditional office setting, there are relatively high powered Intel based PC's spread around at every desk. Each with several gigabytes of hard disk space. Users store their own data on the local hard drives and backups are rarely (if ever) performed.

Thursday, March 27, 2008

Shell Curses function library

"Shell Curses" is a library of script functions that provide the shell programmer the ability to perform text-based cursor movements to specified locations on the screen. This ability permits the creation of menuing and data-entry systems using shell scripts without the need for compiled binaries. These functions are similar to the "C" language "Curses" library.more..

Tuesday, March 25, 2008

Perl sockets : Communicating over TCP

You want to read or write data over a TCP connection.
Sockets handle two completely different types of I/O, each with attendant pitfalls and benefits. The normal Perl I/O functions used on files (except for seek and sysseek) work for stream sockets, but datagram sockets require the system calls send and recv, which work on complete records.more...

Perl : Dealing with Database Errors

You want your program to catch and handle database errors, possibly displaying informative error messages.The best solution is to enable RaiseError when you connect to the database, then wrap database calls in eval: more...

Monday, March 24, 2008

Monitoring With Groundwork Open Source On CentOS 5.1

Nagios is (in my opinion) one of the finest availability and monitoring solutions available. The stability, extendability and cost effectiveness (it is free under the GPL), are second to none (again, my opinion). That being said, it is far from being the easiest monitoring solution to implement. The build process itself, while not being overly complicated, can be vexing to new Linux users. That doesn't even include the configuration, which sometimes still makes me cringe.more...

Saturday, March 22, 2008

Perl: Arrays and hashes only with references

For a little bit forget about array (@) and hash (%) notation. Stick only to variable ($) or in other words, reference symbol and see how easy (I hope) it is.more...

OpenLDAP installation on Debian

The purpose of this article is to give you a straight-forward, Debian-friendly way of installing and configuring OpenLDAP. By the end of this guide, you will have a functional LDAP server that will serve as a central authentication system for user logins onto all machines in the network, without the need to manually create users' accounts on individual machines.

Hacking openSUSE 10.3

Novell's openSUSE 10.3 is an exciting desktop operating environment that includes or supports nearly every program you need for work and play. But there are those last few programs and issues that make openSUSE just short of perfect. Web browser plugins for some kinds of online content; Windows Media and DVD movie playback support; and drivers for Atheros wireless devices and Nvidia and ATI video cards are the chief things holding openSUSE back for some users. This guide will help you remove as many of those barriers as possible.

Thursday, March 20, 2008

Installing Fonts on Linux

One of the things I always enjoy when creating presentations, letters, videos, graphics and other documents is playing with different fonts. Fonts can change a boring text-only presentation or paper into an exciting, stylish, wild or classic experience. Yes, it is very easy to get carried away, but that is part of the fun -- trying to achieve the perfect balance between form and function.more..

Tuesday, March 18, 2008

Tiny $80 SBC runs Debian Linux

KwikByte is shipping its smallest, lowest-cost single-board computer (SBC) yet. Designed for general purpose computing, embedded controls, machine vision, remote monitoring, and database/web servers, the Debian-based KB9260 measures a wee 3.1 x 3.1 inches and costs only $80 in volume. read more..

Using Python to create UNIX command line tools

If you work in IT, as a UNIX® Sysadmin, a software developer, or even a manager, there a few skills that will set you apart from the crowd. Do you fully understand the OSI model? Are you comfortable with subnetting? Do you understand UNIX permissions? Let me add to this list the humble command line tool. By the end of this article, anyone involved in IT at any capacity should be able to create at least a simple command line tool.

Fork, Exec and Process control

The fork() system call will spawn a new child process which is an identical process to the parent except that has a new system process ID. The process is copied in memory from the parent and a new process structure is assigned by the kernel. The return value of the function is which discriminates the two threads of execution. A zero is returned by the fork function in the child's process.
This tutorial will cover the creation of child processes and process control using fork, exec and other C library function calls using the GNU "C" compiler on the Linux operating system.

Sunday, March 16, 2008

FreeBSD 7.0 review

Here we are at the moment of truth for the FreeBSD operating system -- the 7.0 release. This is what FreeBSD users and developers have been waiting for ever since the dark days of the 5.X series when the promises of superior performance, threading, and stability fell flat. Though each release in the FreeBSD 6.X series improved markedly in quality and performance, 7.0 has been widely anticipated as the release that FreeBSD fans can have confidence in. I wish I could say that FreeBSD 7.0 lived up to the hype.more..

Saturday, March 15, 2008

The Memory Management Reference

Memory allocation is the process of assigning blocks of memory on request. Typically the allocator receives memory from the operating system in a small number of large blocks that it must divide up to satisfy the requests for smaller blocks. It must also make any returned blocks available for reuse. There are many common ways to perform this, with different strengths and weaknesses. A few are described briefly here.

Thursday, March 13, 2008

Linux Init Process / PC Boot Procedure

This tutorial covers the PC boot process and the Linux Operating System inititiation of background applications (daemons/services). The sequence, configuration and administration of the Linux boot process is covered. This tutorial is Red Hat and Fedora specific. Other distributions and commercial versions of UNIX often use different run level assignments and/or different script names.

Debian amd64: iceweasel with i386 plugins, outside a chroot

If you weren't already convinced that closed source sucked before, then surely the experience of trying to browse the net with an amd64 machine will have won you over; I could ponder on how much Microsoft is paying Adobe not to release a 64-bit version of their flash plugin— but why Sun is categorically refusing to address our cry for a 64-bit java plugin for mozilla based browsers for this many years is beyond me.more...

Tuesday, March 11, 2008

Perl: Building Dynamic Web Pages

The simple examples in the previous sections showed how to load and use the CGI.pm module to display a very simple web page and how to examine the error logs of the web server to help debug a CGI program that doesn't display properly.
The real power of CGI comes from its ability to provide dynamic content—web pages that may display different information depending on such factors as when they're called, such as the date and time in the previous example. Dynamic content also handles the requests of users that are entered by typing in text fields, clicking on so-called "radio" buttons, selecting from lists, or other ways of inputting.more..

Saturday, March 08, 2008

Setting up UUCP over SSH

UUCP is a very good way to distribute email to a domain (not just a specific individual but an entire domain, with several persons, mailing lists, aliases, etc) when the machine which serves the domain is not always connected or does not have a permanent address (dial-up with POTS or ISDN but also cable modems with dynamic IPs or frequent cut-offs). It was intended that way (unlike many hacks over SMTP) and it works,more...

Wednesday, March 05, 2008

Unix: Changing UIDs and GIDs

Changing user identification numbers (UIDs) and group identification numbers (GIDs) in the IBM® AIX® operating system (AIX) isn't one of the more exciting tasks a UNIX® administrator can face. But although it's often seen as a dreadful task, it can be an essential job that an administrator must perform to keep systems in sync within the environment. Because changing UIDs and GIDs can cause serious harm to your environment, you must be careful. The most important thing is understanding what your changes do. Then, you can learn how to make the changes correctly and even automate the process with UNIX scripts.

Tuesday, March 04, 2008

File Sharing via NFS

The usual reason for running an NFS server is that you want to share files with other UNIX or Linux systems. You might do this to share static files, such as program binary files—for instance, you might store large programs on a server and allow computers with smaller hard disks to run those large programs via NFS. Another common use of NFS is to provide a centralized server for user changeable files—rather than place users' home directories on their own workstations, you can place them on a centralized server.read more..

Monday, March 03, 2008

Find All Global Variables with Perl

Perl 5's roots in Perl 1 show through sometimes. This is especially evident in the fact that variables are global by default and lexical only by declaration. The strict pragma helps, but adding that to a large program that's only grown over time (in the sense that kudzu grows) can make programs difficult to manage.
One problem of refactoring such a program is that it's difficult to tell by reading whether a particular variable is global or lexical, especially when any declaration may have come hundreds or thousands of lines earlier. Your friends and co-workers may claim that you can't run a program to analyze your program and find these global variables, but you can!more...

Saturday, March 01, 2008

Log file basics

A typical UNIX® or Linux® machine creates many log files during the course of its operation. Some of these contain useful information; others can be used to help you with capacity and resource planning. This article looks at the fundamental information recorded within the different log files, their location, and how that information can be used to your benefit to work out what is going on within your system.

How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs

  This project is about how to systematically persuade LLMs to jailbreak them. The well-known ...