Feb
26
2008
0

HowTo - add google adsense to wordpress

This would be my first how-to posting around wordpress but what the hell, this thing works a lot better than my bottomless pit of bookmarks. I found this person’s website helpful when integrating adsense into my website recently. Looks like they wrote up a bunch of other how-to’s around wordpress.

http://www.tamba2.org.uk/wordpress/adsense/

http://www.tamba2.org.uk/wordpress/

Written by Tom in: HowTo, wordpress | Tags: , ,
Feb
21
2008
0

HowTo - disable the system beep in ubuntu

Found this via the old google search which landed me upon the how to geek’s friendly advice:

In Gnome select “System->Prefrences->Sound->System Beep Tab

You’ll see the checkbox.  The link to the site I found this is below.

http://www.howtogeek.com/howto/ubuntu/disable-the-system-beep-on-ubuntu-edgy/

Written by Tom in: HowTo, linux, ubuntu |
Feb
21
2008
0

ASP.NET is not authorized to access the requested resource

I manage several IIS servers and from time to time I struggle with permissions and web apps. Some situations are more unique than others, but usually I run into problems when a webserver is running a .NET appliaction and trying to reach across the network to capture some data from a network share on another server.

This is the error you might be familiar with:

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true">, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. </identity>

To get your webapp to work correctly you have to decide how secure you need the webapp.  If this application does not require security you’ll need to:

  1.  Create a domain user (remember the password…duh)
  2. Under IIS directory security click “Edit” for Authentication and access control.
  3. Check allow anonymous access and browse to the domain user, enter the password you gave the user
  4. Sometimes optional.  Create new application pool and set the identity to the domain user you created and browse to the webapp you’re working with in IIS and select properties and the virtual directory tab.  Set the app to run as the new application pool you created.  This will ensure IIS will use the user you created.
  5. Browse to the network resource on the other server and add the created user to the share and ntfs permissions of that file/folder you need to access (give appropriate permissions, if you don’t require write don’t give it!)
  6. Edit the web.config file for the app you’re working and set <identity impersonate=”false”/>

If you require to secure the webapp to a select group of individuals it is slightly different.

  1. Give the group/users appropriate ntfs permissions to the web app
  2. Under IIS browse to the application and select properties and Directory Security.  Uncheck anonymous access (this will capture the windows user authenticated that’s opening the web application).
  3.  Make sure the network share/folder/file has the required users/groups and appropriate permissions.
  4. Edit the web.config file for the app you’re working with and set <identity impersonate=”true”/>
  5. While you’re in web.config you’re going to need to familiarize  yourself with the following two tags to secure your applications:
  6. <allow roles=”Active Directory group”>
  7. <deny users=”*”/>
  8. That will check the user authenticated for the correct group membership as assigned in Active Directory and the file permissions on your network resource and will deny all users that aren’t members.

Side note….I’m not a programmer just a SysAdmin.  I’m sure there are all kinds of ways to get around this or perhaps even do it better.  The above is just what I’ve encountered while working with internal portal applications.  There are definitely not enough hours in the day to fully understand ASP.NET application and IIS security but I think that’s a pretty good stab at it.  Whenever I google for results I have a hard time remembering the differences between the Impersonate user so hopefully now I won’t forget!

Quick note… Use  <identity impersonate=”false”/> when you want to use IIS anonymous security and  <identity impersonate=”true”/> when you want to ensure your application is most secure!

Written by Tom in: IIS, asp.net, security |
Feb
20
2008
0

HowTo - use chmod

The Ubuntu website has a good tutorial on chmod.

https://help.ubuntu.com/community/FilePermissions

Written by Tom in: linux, security, ubuntu |
Feb
13
2008
0

I love vmware - Upgrade procs & ram in HP 685 c class blades (c7000) - ESX 3.02

After a year of service the 3 685 c class blades that I work with have served us well.  They started as Dual Proc AMD 8216 (dual core 2.4ghz) with 16gb of ram.  In order to expand the virtualization in our environment we decided to double the resources in each of the blades by adding 2 more procs and 16gb of ram.  I added the ram last week, but because of limitations in the system bus you need to have all 4 procs installed before the other 8 dimm banks are activiated.

Steps involved to upgrade procs & memory:

  1. Add new licenses from vmware (esx is licensed by every 2 physical procs/sockets)
  2. Login to Virtual Center and put host in maintenance mode.
  3. This should vmotion all virtual machines from that host to other running hosts.
  4. Shutdown host
  5. Carefully install cpus and ram
  6. Start server (will reboot once after starting)
  7. Upgrade complete with ZERO downtime in the middle of the day.
  8. 685c blades are now 4 cpu, 8 core and 32gb ram and ready for some more action.
Written by Tom in: amd, cpu, esx, ram, upgrade, vi3, vmware |
Feb
11
2008
6

HowTo - install FreeNX on Ubuntu 7.10 x64

I found this url in the endless ubuntuforms.org. These steps worked great for me. In order to get this working correctly you must know your external ip and/or dns name and also have ssh installed with the correct port (22) forwarded to the machine in question.

Start by setting up your repos:
Add the following to /etc/apt/sources.list

deb http://www.datakeylive.com/ubuntu gutsy main
deb-src http://www.datakeylive.com/ubuntu gutsy main

This next step failed for myself, but is only the repo apt-key and didn’t cause the install to fail:

wget http://www.datakeylive.com/ubuntu/dists/gutsy/wjeremy.key | sudo apt-key add -

Then run good ol: sudo apt-get update

This next step will install the packages required:

sudo apt-get install expect openssh-server tcl8.4 libxcomp2 libxcompext2 libxcompshad nxlibs nxagent nxproxy nxclient freenx

You can check to make sure it installed correctly by executing:

sudo apt-get -f install

sudo apt-cache show expect openssh-server tcl8.4 libxcomp2 libxcompext2 libxcompshad nxlibs nxagent nxproxy nxclient freenx | grep “Unable”

I needed to add the following to the bottom of /etc/X11/xorg.conf (make sure to back your’s up first!)

Section “Files”

# path to defoma fonts
FontPath “/usr/share/fonts/X11/misc”
FontPath “/usr/share/fonts/X11/100dpi/:unscaled”
FontPath “/usr/share/fonts/X11/75dpi/:unscaled”
FontPath “/usr/share/fonts/X11/Type1″
FontPath “/usr/share/fonts/X11/100dpi”
FontPath “/usr/share/fonts/X11/75dpi”
FontPath “/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType”
EndSection

You’ll need to download the following file ( i used my home directory)

nxcupsd-wrapper

You need to set the permissions on that last file downloaded to make it work right:

chmod a+x nxcupsd-wrapper
sudo chmod 755 /usr/lib/cups/backend/ipp

Now you need to add a user that is able to remote in; replace xxxx with username:

sudo nxserver –adduser xxxx

On your remote machine make sure to install the client and you’re good to go!

Written by Tom in: HowTo, linux, ubuntu, x64 |
Feb
09
2008
0

Ubuntu x64 7.10 gutsy and ATI x300 w/ compiz

Finally I found a few instructions which made this configuration easy and smooth.

http://www.chr05210084.com/content/install-compiz-fusion-ubuntu-gutsy-using-ati-video-card

1. Enable fgrlx driver.
Install linux-restricted-modules and restricted-manager provied in the restricted repositories:
sudo apt-get update
sudo apt-get install linux-restricted-modules-generic restricted-manager

Open the restricted drivers manager in “System -> Administration -> Restricted Drivers Manager” and select “ATI accelerated graphics driver”.
2. Install xserver-xgl package

sudo apt-get install xserver-xgl

3. Install compiz

sudo apt-get install compizconfig-settings-manager compiz compiz-core compiz-fusion-plugins-main compiz-fusion-plugins-extra compiz-gnome compiz-plugins libcompizconfig-backend-gconf libcompizconfig0

4. Reboot
5. Log in. 3D effects should be enabled!

Written by Tom in: ati, compiz, linux, ubuntu, x64 |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes