Use Manifest to Gain Admin Rights

April 6th, 2007 No comments

Microsoft recommend that all executables, such as Setup programs (which need access to protected areas of Windows), should be marked as requireAdministrator. This is achieved by using a manifest file (embedded or external).

You can try this yourself. Below is a valid manifest file. To mark a file “Fred.exe” as requireAdministrator, save the text below to the file “Fred.exe.manifest” in the same folder as “Fred.exe”. When “Fred.exe” is run under Vista User logon you will see the customary Admin approval window appear.

Manifest file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">      <assemblyIdentity version="1.0.0.0" 	processorArchitecture="X86" 	name="ExeName" 	type="win32"/>  <description>elevate execution level</description>     <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">       <security>          <requestedPrivileges>             <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>          </requestedPrivileges>       </security>    </trustInfo> </assembly>
Categories: Uncategorized Tags:

How to Remaster Ubuntu Dapper Drake

April 3rd, 2007 No comments

How to remaster Ubuntu Dapper Drake

Categories: Uncategorized Tags:

How-to: Ubuntu Static IP

March 19th, 2007 No comments

Here is how to setup a static address on Ubuntu – presumably the same for Debian.

Categories: Uncategorized Tags:

Regex Sample

March 15th, 2007 No comments

Examples

The following example demonstrates how the REG_NOTBOL flag can be used with the regexec subroutine to find all substrings in a line that match a pattern supplied by a user. (For simplicity, very little error-checking is done in this example.)

(void)regcomp(&re,pattern,0);
/* this call to regexec finds the first match on the line */
error = regexec(&re,&buffer[0],1,&pm,0);
while (error == 0) {   /* while matches found */
	/* This call to regexec finds the next match */
	error = regexec(&re,pm.rm_ep,1,&pm,REG_NOTBOL);
}
Categories: Uncategorized Tags:

Open Source and Small.biz Outsourcing

March 10th, 2007 No comments

A couple of interesting links from the Register:

Open source: Management fears

Small businesses not outsourcing

Categories: Uncategorized Tags:

Chkconfig for Ubuntu

March 8th, 2007 1 comment
$ apt-get install libnewt0.52 
$ ln -s /usr/lib/libnewt.so.0.52 /usr/lib/libnewt.so.0.50 
$ wget https://www.tuxx-home.at/projects/chkconfig-for-debian/chkconfig_1.2.24d-1_i386.deb 
$ dpkg --force-all -i chkconfig_1.2.24d-1_i386.deb
Categories: Uncategorized Tags:

Ubuntu Asterisk from Scratch

March 8th, 2007 No comments

Stolen from fizgig (I skipped a couple of steps re kernel headers):

HOWTO: Compile Asterisk from scratch


I took notes on what I did so I could do it later. Maybe someone else might find them useful. They might not be the most ideal – I’m not an expert but please feel free to comment and I’ll update this message.

0. Edit the /etc/apt/sources.list file to remove the # signs before the lines that begin with # deb http to activate them and then do apt-get update.

1. Install Packages:
apt-get install sendmail zlib1g-dev libssl-dev ncurses-dev libnewt-dev gcc-3.4 subversion openssh-server build-essential linux-source-2.6.12 (or whatever kernel you have)

2. Prepare Linux kernel source
cd /usr/src
tar xvjf linux-source*
(Extracts the files from the zip file)
rm linux-source-2.6.12.tar.bz2 (Don’t need the zip anymore)
ln -s linux-source-2.6.12 linux (makes /usr/src/linux point to /usr/src/linux-source-2.6.12)
cd linux
cp /boot/config-2.6.whatever .config
(copies the config file that was used to compile your kernel into the /usr/src/linux dir)
make menuconfig then exit and save config
uname -r
(examine what comes after 2.6.12 For example, I had 2.6.12-9-386)
vi /usr/src/linux/Makefile
Go to the EXTRAVERSION line and make it like so:
EXTRAVERSION=-9-386
make modules_prepare
ln -s /usr/src/linux /lib/modules/`uname -r`/build

3. Get Asterisk Packages
cd /usr/src
svn checkout https://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2
svn checkout https://svn.digium.com/svn/zaptel/branches/1.2 zaptel-1.2
svn checkout https://svn.digium.com/svn/libpri/branches/1.2 libpri-1.2
svn checkout https://svn.digium.com/svn/asterisk-sounds/branches/1.0 asterisk-sounds-1.0


4. Compile Stuff
-=libpri=-
cd /usr/src/libpri-1.2
make clean
make
make install
-=Zaptel Modules=- (If you’re going to use zaptel hardware to connect to PSTN)
cd /usr/src/zaptel-1.2
Change anything in /usr/src/zaptel/zconfig.h if you need to (I didn’t need to)
make clean
make linux26
make zttool
make install
-=Asterisk=-
cd /usr/src/asterisk-1.2
make clean
make mpg123

note: This doesn’t work for me as of 2-20-07. I had to go into the mpg123 directory myself and type:

Quote:

make CC=gcc LDFLAGS= OBJECTS=’decode_i386.o dct64_i386.o decode_i586.o audio_oss.o term.o’ CFLAGS=’-DI386_ASSEM -DPENTIUM_OPT -DREAL_IS_FLOAT -DLINUX -DREAD_MMAP -DOSS -DTERM_CONTROL -Wall -O2 -m486 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math’ mpg123-make


make
make install
make samples
(if you want sample config files put into /etc/asterisk)
-=Asterisk-Sounds=-
cd /usr/src/asterisk-sounds-1.0
make install

5. Edit udev
vi /etc/udev/udev.rules

Stick the paragraph below somewhere

# Section for zaptel device
KERNEL=”zapctl”, NAME=”zap/ctl”
KERNEL=”zaptimer”, NAME=”zap/timer”
KERNEL=”zapchannel”, NAME=”zap/channel”
KERNEL=”zappseudo”, NAME=”zap/pseudo”
KERNEL=”zap[0-9]*”, NAME=”zap/%n”

6. That’s the installation part. Go ahead and reboot. Then, if you have some zaptel piece of hardware installed, try lsmod | grep zap and see if the two modules are already installed.

7. Configure it!

================

edit: removed extra steps to manually compile mpg123 that weren’t necessary.
edit2: removed tar extraction step since svn brings the files over untarred. (duh)
edit3: Added some explanation notes.
edit4: Added mpg123 compile note 2-20-07

__________________
come on guys, it’s all ball bearings nowadays

Categories: Uncategorized Tags:

Linux on MacMini

March 8th, 2007 1 comment

CentOS 4.4 installation went smoothly but the system wouldn’t boot (got stuck in Grub).

Rather than debug this, I simply switched to Ubuntu Server 6.10 where all worked well. Also tried Ubuntu Desktop 6.10 which worked well, including wireless. Only significant issue with the desktop edition was that it failed to reboot cleanly – required power-cycle.

Categories: Uncategorized Tags:

Simple instructions to get Linux on your Intel iMac

March 7th, 2007 No comments

This article assumes basic knowledge surrounding Linux, terminal and the underlying Unix operating system. Those without basic knowledge will find this article hard to follow.

Info for the blessing the EFI part are taken from EFI Howto

  1. Download from the Intel site: EFI Sample Implementation
  2. Unzip the file to /efi
  3. do ‘sudo bless –folder /efi –file /efi/Binary/BIOS32/Bin/GraphicsConsole.efi –setBoot’
  4. Download the following files : e.efi, elilo.conf, vmlinuz, initrd from Bootfiles/Kernel/Initrd
  5. If you have a 20″ iMac change in elilo.conf “video=imacfb:i17” to “video=imacfb:i20”
  6. Copy the downloaded files to a FAT-formated USB memory stick/HDD into the root dir.
  7. Reboot with your memory stick connected.
  8. You’ll get the familiar chime and gray screen, wait about 10 seconds then hit the spacebar.
  9. Select Boot Maintenance Manager.
  10. Select Boot From File.
  11. Select your USB memory stick/HDD.
  12. Select e.efi

To get back to OSX do steps 9,10. Then select your OSX HDD shown as “NO FILE SYSTEM INFO”.

Use /System/Library/CoreServices/boot.efi to boot OSX.

Alternatively, it is possible to set up Dual Booting with separate partitions. That allows you to choose between Mac OS X and Linux using the built-in boot volume chooser (hold down Option while booting).

This post was copied from and more info here

Categories: Uncategorized Tags:

SipX Installation

March 5th, 2007 No comments

How to install sipX on a CentOS 4.4 Xen DomU

Setup yum repo:

wget -P /etc/yum.repos.d/ https://www.sipfoundry.org/pub/sipX/sipx-centos.repo

Download the xen DomU kernel and related glibc files from Xensource

rpm -Uvh glibc-common-2.3.4-2.25.xs0.4.4.57rpm -Uvh glibc-2.3.4-2.25.xs0.4.4.57   

rpm -ivh kernel-xenU-2.6.9-42.0.3.EL.xs0.4.0.263.i686.rpm

Due to some conflicts, install sipx-w3c-libwww first

yum install sipx-w3c-libwwwyum install sipxpbx

Create and install certificate:

/usr/bin/ssl-cert/gen-ssl-keys.sh/usr/bin/ssl-cert/install-cert.sh

Check config and start:

service sipxpbx configtestservice sipxpbx start

And you’re done

Also check out the the sipfoundry wiki

Categories: Uncategorized Tags: