Wednesday, October 28, 2009

SELINUX: fix https 'Access denied' problem

SELinux: Fix HTTPD 'Access Denied' Problem

I reconfigured the httpd service and changed DocumentRoot. However each time when I tried to visit the web site, I always got an 'access denied' error. Checking the error log under /var/log/httpd, I got lines like:

[Mon Jan 30 20:01:09 2006] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
As I believed the permissions on the DocumentRoot are correctly set (0755, which is quite standard), I suspected the bad-famed SELinux was doing its trick again.

This time I was just doing the "brutal" job: disable SELinux protection on httpd completely:

setsebool -P httpd_disable_trans 1,

and

/sbin/service httpd restart.

Then... exactly as what I expected, the "access denied" error disappeared.
Now what an ironic story: I initially wanted to secure my whitebox with SELinux, yet I finished with completely disabling it on ftp, samba, and http services. I really wonder how many end-users are really utilizing SELinux in a serious way...

Thursday, September 03, 2009

Copy entire folder in Linux

Copy entire folder in Linux

To copy an entire folder (directory tree) in Linux, use the following method:

mkdir target_directorycd source_directorycp -ap . target_directory
Other options:
cp -apv . target_directory (for verbose results)\
cp -ap . target_directory (for unix)

More info:-
linuxguide.sourceforge.net
CategoriesUnix/Linux Reference

Thursday, August 13, 2009

Solved: Outlook hidden OLK** Temporary Folders - how do you list them?

Solved: Outlook hidden OLK** Temporary Folders - how do you list them?


1ST STEP


Use your registry editor to navigate to the following location (you may need to replace the number 11 with your applicable version of Office)

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security

There will be a registry key called "OutlookSecureTempFolder" Check the value that is assigned to this key which should be the the true location of Outlooks temp files directory which is different from your regular Windows temp files directory. This is the directory that you want to delete the temp files from. If you are unable to locate the registry key value mentioned above by navigating to the location provided you should be able to search the registry by opening the registry editor and clicking EDIT >> FIND and then typing in the name of the registry key (OutlookSecureTempFolder)

If deleting the files from the directory doesn't work try creating a new temp files directory for Outlook to use and change the path on the registry key above to point to the new directory.



2ND STEP


That is by design I think. In Microsoft's infinite wisdom you can view the Temporary Internet Files folder in windows explorer but cannot see the temporary subfolders beneath it. In the command shell you cannot see the Temporary Internet Files directory but you can change directory by typing: C:\>cd "Temporary Internet Files" , and then type: C:\>dir to view its contents in list format. You should be able to see the subfolders at this point and use the CD command to view the contents of each. You can use: C:\>rd /s to remove the OLK folder and all of its contents. Type: rd /? for command usage.

There may be another way to do this, I'm just shooting from the hip here. I'm pretty comfortable with the command shell and have used it for years. However, be very careful!! There is no recycle bin in the command shell!

Export Outlook contacts and Import into Evolution

Export Outlook contacts and Import into Evolution

The past two weeks have seen little blogging so I feel I must divulge a little. I was on a long road trip visiting Chicago, Chippewa Falls, northern Minnesota, and Minneapolis. It was exhausting. We painted a cabin which was too much work while you’re on the lake. Mason had fun though. I have to say, I wish broadband had a larger presence in the U.S. It’s a different world out there and I appreciate my cable speeds that much more.

Evolving your contact list to Evolution from Outlook.

  • Export Outlook contacts to “yourfilename.csv”
    1. Open Outlook, File -> import and export
    2. Export to a file
    3. Comma Seperated Values (Windows)
    4. Choose your contacts folder
    5. save as “yourfilename.csv”
  • Transfer “yourfilename.csv” to your PC with Ubuntu
    1. (use a USB stick, email it to yourself, do whatever works)
  • Import “yourfilename.csv” into Evolution
    1. Open Evolution, File -> Import
    2. Import a single file
    3. Click the filename field and browse for “yourfilename.csv”
    4. Choose “Outlook CSV or Tab (.csv, .tab)”
    5. Pick a folder to import to
  • Revel in the view

Evolution import of Outlook csv

This process worked flawlessly in Evolution 2.11.90 for me with over 1200 contacts from Outlook 2003.

Monday, July 06, 2009

Linux Ethernet set-up

Linux Ethernet set-up

[root@zeus root]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=10.10.1.255
IPADDR=10.10.1.4
NETMASK=255.255.255.0
NETWORK=10.10.1.0
ONBOOT=yes
TYPE=Ethernet

[root@zeus ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=zeus
GATEWAY=10.10.1.8

[root@hera root]# cat /etc/resolv.conf
nameserver 192.0.34.43
nameserver 193.0.0.236


[root@hera root]# service network restart






Thursday, December 04, 2008

Make your Menu Load Faster

Make your Menu Load Faster

This is one of my favorite tweaks as it makes a huge difference to how fast your machine will ‘feel’. What thistweak does is remove the slight delay between clicking on a menu and XP displaying the menu.

1) Go to Start then Run
2) Type ‘Regedit’ then click ‘Ok’
3) Find “HKEY_CURRENT_USER\Control Panel\Desktop”
4) Select “MenuShowDelay”
5) Right click and select “Modify
6) Reduce the number to around “100"This is the delay time before a menu is opened. You can set it to “0? but it can make windows really hard to useas menus will open if you just look at them - well move your mouse over them anyway. I tend to go for anywhere between 50-150 depending on my mood (REBOOT MAYBE NEEDED)

Thursday, September 25, 2008

Sample .bash_profile login script

Sample .bash_profile login script


# login script of Wayne Pollock
#Last updated: 5/1/07
# LEVEL is used to destinguish between login shell
# windows (root windows) and other shells, because
# a different prompt is used in each case. This
# must be set before invoking .bashrc!
export LEVEL=0
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs:
set -o ignoreeof # only "exit" or "logout" will log me off the system.
shopt -s huponexit
mesg n # Don't allow anyone to interrupt my session
umask 027 # Create files with group, other permissions turned off.
ulimit -c 0 # Prevent a crashed program from creating a "core" file.
PATH=$HOME/bin:$PATH:/usr/local/sbin:/sbin:/usr/sbin
CDPATH=":$HOME:$HOME/man:$HOME/bin"
MANPATH="$HOME/man:$MANPATH"
# The following changes the sort order to ACSII order, which does
#not ignore case or punctuation characters (such as leading periods).
LC_COLLATE=C
EDITOR=vim
VISUAL=$EDITOR
FCEDIT=$EDITOR
PAGER=less
ENV=$HOME/.bashrc
HISTSIZE=1000
HISTFILESIZE=1000
LESS='-fXemPm?f%f .?lbLine %lb?L of %L..:$' # Set options for less command
MAILCHECK=1
MAILPATH=/var/spool/mail/$USER'?Hey! You have new mail!'
#PS1='[\u@\h \W]\$ '
TERM=xterm # PuTTY emulates this.
TMPDIR=~/tmp
export CDPATH ENV HISTSIZE HISTFILESIZE LC_COLLATE LESS MAILCHECK MAILPATH
export EDITOR MANPATH PAGER TMPDIR VISUAL FCEDIT
if test "$HOSTNAME" = "YborStudent"
then
CVSROOT='/var/cvs-repos/cop2805'
else
CVSROOT=':ext:wpollock@YborStudent.hccfl.edu:/var/cvs-repos/cop2805'
fi
export CVS_RSH=ssh CVSROOT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/lib
# Check for email:
if type -p frm >/dev/null
then
frm -s new -s unread -q
echo
elif type -p mailutil >/dev/null
then
mailutil check /var/spool/mail/wpollock
echo
fi
# Display a fortune cookie message and other information:
fortune
echo
w
echo

Sunday, August 24, 2008

http://www.cisco.com/networkers/nw02/post/presentations.html

http://seer.support.veritas.com/docs/275107.htm

http://publib.boulder.ibm.com/infocenter/lnxpcomp/v7v91/index.jsp?topic=/com.ibm.vacpp7l.doc/language/ref/clrc08do_statement.htm

http://uk.geocities.com/cochranejwink/nbu.html
http://saifulaziz.wordpress.com/
http://wing7.wordpress.com/2008/02/03/netbackup-tips/
http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/prod_configuration_examples_list.html
http://searchsecuritychannel.techtarget.com/tip/0,289483,sid97_gci1242617,00.html
http://www.unix.com.ua/orelly/unix/unixnut/index.htm
http://sysunconfig.net/backup/netbackup.html
http://seer.support.veritas.com/docs/183145.htm
http://mian.homepage.dk/
http://enterpriseunix.blogspot.com/2007/11/veritas-netbackup-part-4-logs-directory.html
http://www.coolcommands.com/index.php?option=com_frontpage&Itemid=1
http://www.sun.com/bigadmin/shellme/
http://www.ibm.com/developerworks/linux/library/l-awk1.html
http://technet.microsoft.com/en-us/library/cc785197.aspx
http://www.2000trainers.com/cisco-ccna-09/ccna-access-list-wildcard-mask/
http://office.microsoft.com/en-us/sharepointportaladmin/CH011714741033.aspx
http://technet.microsoft.com/en-us/library/cc287794.aspx
http://www.bootdisk.com/
http://compnetworking.about.com/od/windowsxpnetworking/Windows_XP_Networking_Microsoft_Windows_XP.htm
http://www.sophos.com/security/best-practice/viruses.html
http://technet.microsoft.com/en-us/library/cc263304.aspx
http://www.idevfactory.com/
http://searchwinit.techtarget.com/tip/0,289483,sid1_gci1322528,00.html?asrc=SS_CLA_310687&psrc=CLT_1
http://searchwinit.techtarget.com/tip/0,289483,sid1_gci1312658,00.html
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/directory/activedirectory/stepbystep/domcntrl.mspx

http://www.microsoft.com/technet/prodtechnol/sql/2000/books/adminpoc.mspx
http://tekvibes.co.uk/ent/archives/7
http://www.geekinterview.com/
http://seer.entsupport.symantec.com/docs/BEWNT_index.htm?bcsi_scan_118FBEC8574BA922=1&bcsi_scan_F4B1BB62929FBD9E=0&bcsi_scan_filename=BEWNT_index.htm

http://technet.microsoft.com/en-us/library/bb727010.aspx
http://searchwinit.techtarget.com/tips/index/0,289482,sid1_tax286434_idx0,00.html
http://www.petri.co.il/ad.htm
http://www.adminschoice.com/
http://www.utdallas.edu/ir/cats/unix/commands.html
http://blogs.sun.com/timthomas/entry/solaris_cifs_in_workgroup_mode
http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=9
http://technet.microsoft.com/en-us/library/cc262016.aspx
http://dlc.sun.com/osol/docs/content/SYSADV1/hbx86boot-68676.html#fvzqr
http://dlc.sun.com/osol/docs/content/IPS/login.html
http://office.microsoft.com/en-us/sharepointtechnology/CH100651031033.aspx
http://sharepoint.microsoft.com/blogs/GetThePoint/default.aspx
http://testinside.blogspot.com/
http://www.sadikhov.com/forum/index.php?showforum=33
http://www.ccna.cc/offer-latest-pass4sure-ccna-640-802-v317/
http://bash.cyberciti.biz/bms/init/functions.FreeBSD.html
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://bash.cyberciti.biz/
http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/lsst/
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds6/ypcat.htm
http://www.learntosubnet.com/
http://happyrouter.com/happyrouter/pix-firewall-configuration-from-scratch
http://happyrouter.com/
http://www.petri.co.il/ad.htm
http://www.cisco.com/univercd/cc/td/doc/product/iaabu/pix/pix_61/config/bafwcfg.htm
http://www.cisco.com/en/US/docs/internetworking/technology/handbook/ito_doc.html
http://www.techsoup.org/learningcenter/hardware/page4784.cfm

http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a0080094ea2.shtml#diag