Debian Support
configuring htaccess restrictions on debian apache2 server
Submitted by 400medley on Thu, 2008-06-26 04:41. Communications | Debian Support | SupportThis is a quick guide on how to set up htaccess restrictions on a directory located on a server running apache2 with a debian OS.
First, you will need to update the httpd.conf file, which should be located in the apache2 directory, as follows:
<Directory (directory to be protected)>
Options Indexes Includes FollowSymLinks Multivews
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
Make sure to take out the "" they are only included so this post displays properly.
Once this update is saved, restart the apache2 server with the following command, or something like it depending on your setup, as follows:
how to use awk to add information to a text file
Submitted by admin on Fri, 2008-02-01 08:36. Communications | Debian Support
awk '{if(/texttofind/) {printf("%s\nfromuser=%s\n",$0,substr($3,index($3,"<")+1,index($3,">")-2))} else print $0}' "file1.txt" > "file2.txt"
where:
if(/texttofind/) does A) if it is true or does B) if not true
texttofind is the text you want to add a new line after
printf("%s\nfromuser=%s\n",$0,substr($3,index($3,"<")+1,index($3,">")-2)
this statement prints the origional line in string format, then drops a new line with the /n. Then prints: fromuser=.. then prints a substring from the above line where the start of the substring is a "<" and the end of the substring is a ">"
fsck your root partition
Submitted by byo71 on Mon, 2008-01-21 09:25. Communications | Debian Supporttelinit 1
mount -o remount,ro /
fsck -f /dev/hd..
mount -o remount,rw /
runlevel
telinit 3
mount iso cd image
Submitted by byo71 on Sat, 2008-01-19 05:48. Communications | Debian Supportmount -o loop -t iso9660 /root/Desktop/etch-custom-1013.iso /mnt/iso
move all mp3 files from 1 partition to a single folder using 1 command.
Submitted by admin on Wed, 2007-12-19 08:17. Communications | Debian SupportTo make a list of all the files in a certain place...
locate *.mp3 | grep video > file.txt
To do a mass move of all the files
mv $(cat file.txt | perl -pi -e 's/ /\ /g' | cut -d "/" -f 5 | cut -d "/" -f 2 | sort | uniq) /mnt/home/music/
of course this is just and example, you will have to modify the cut commands and locate commands to do exactly what you want.
do not just copy and paste this command into your console it will not work.
OpenVPN GUI installer fails to install the TAP32 adapter
Submitted by byo71 on Thu, 2007-10-11 01:10. Communications | Debian SupportEver try to install the OpenVPN GUI from openvpn.se and have the tapinstall.exe fail?
Windows 2000/XP has a bug that it cannot properly detect new hardware by
*.inf files, if the RunOnce registry key is missing for the following
location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
This key is often used by installers to execute post-reboot programs, but
sometimes they accidentally delete this key.
IMPORTANT: This article contains information about modifying the registry.
Make sure that you understand how to backup and restore the registry, in
case a problem occurs. Please read the linked Microsoft Knowledge Base
grep an IP for use in a script
Submitted by byo71 on Sat, 2007-10-06 06:02. Communications | Debian Supportnslookup any.domain.tld | grep Address | cut -d ":" -f 2 | grep -v "#" | cut -d " " -f 2
passwordless SSH login
Submitted by byo71 on Thu, 2007-09-27 02:54. Communications | Debian Supportneed to run scripts on another server but dont want to have to include your passwords in the scripts?
Use RSA logins instead.
This uses a pre-generated set of public RSA keys to authenticate sessions rather than having to enter passwords.
On the machine you wish to log in from:
$ ssh-keygen -t rsa
make sure to leave the passphrase blank!
$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@server
you will be prompted for the user's password to authenticate the key transfer.
This message will appear when the transfer is complete:
"
Now try logging into the machine, with "ssh 'username@server'", and check in:
Reset the root mysql password
Submitted by byo71 on Wed, 2007-09-19 04:09. Communications | Debian SupportHere is how you can reset forgotten root password,
Be aware that following will reset your root password:
# /etc/init.d/mysql stop
# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
# mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password=PASSWORD("your password here") WHERE User="root";
mysql> exit
# /etc/init.d/mysql stop
# /etc/init.d/mysql start
Pay attention that, mysql can be in different folders depending on the installation, for different linux version the way you can start or stop the mysql can very.
mount usb flash drive
Submitted by byo71 on Sat, 2007-08-11 04:06. Communications | Debian Supportmount -t vfat -o rw,nosuid,nodev,quiet,shortname=mixed,uid=1001,gid=100,umask=077,iocharset=utf8 /dev/sda1 /mnt/usb


Recent comments
30 weeks 19 hours ago
40 weeks 2 days ago
40 weeks 2 days ago
45 weeks 3 days ago
52 weeks 19 hours ago
1 year 2 weeks ago
1 year 14 weeks ago
1 year 14 weeks ago
1 year 15 weeks ago
1 year 29 weeks ago