ARCHIVE / DATE_INDEX

Archive

88 posts

Jul 16, 2015 • 1 min read

recover files with linux tools

ddhttps://en.wikipedia.org/wiki/Dd_%28Unix%29 dd_rescuehttp://www.garloff.de/kurt/linux/ddrescue/ PhotoRechttp://www.cgsecurity.org/wiki/PhotoRec Foremosthttp://foremost.sourceforge.net/ MagicRescuehttp://www.itu.dk/people/jobr/magicrescue/ …

Apr 27, 2013 • 1 min read

StrongSwan and Android configs

root@six #cat ipsec.conf conn tugriceri.com leftsubnet=0.0.0.0/0 left=209.208.63.204 leftcert=/cert/strongswan.pem leftauth=pubkey leftsendcert=yes leftid=six.tugriceri.com right=%any rightid=%any rightsourceip=10.0.5.0/24 …

Jul 30, 2012 • 1 min read

libgcc_s.so.1 must be installed for pthread_cancel to work

If you are trying to use the chroot feature with a multithreaded Apache installation you may get the folllowing message "libgcc_s.so.1 must be installed for pthread_cancel to work". Add LoadFile /lib/libgcc_s.so.1 to your Apache …

Jul 18, 2012 • 1 min read

DRBD configuration with loop file

dd if=/dev/zero of=disk1.raw bs=1073741824 count=201009 losetup -f disk1.raw1010 losetup -a1012 stat /dev/loop0fdisk /dev/loop0# rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm# vi /etc/yum.repos.d/elrepo.repoenabled=0# …

Jul 03, 2012 • 1 min read

PHP 5.4 memcache

In file included from /usr/local/memcache-3.0.6/memcache.c:30:/usr/local/memcache-3.0.6/php_memcache.h:75:1: warning: "IS_CALLABLE" redefinedIn file included from /usr/local/php/include/php/main/php.h:34,from …

May 29, 2012 • 1 min read

DSMC backup

dsmc incremental /mnt/DB -subdir=yes

Apr 16, 2012 • 1 min read

Resize LV 2

e2fsck -f /dev/mapper/VGeva-datavol0fdisk /dev/mpath4 #Delete partition and then add againpvresize /dev/mapper/mpath4p1lvextend -r -L749.9G /dev/mapper/VGeva-datavol0

Mar 06, 2012 • 2 min read

NFSEN SELinux Permission

Summary:SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files/var/local/nfsen/var/run/nfsen.comm.Detailed Description:SELinux has denied the httpd access to potentially mislabeled …

Mar 06, 2012 • 1 min read

Failed to open "/var/lib/dbus/machine-id"

process 16780: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directorySee the manual page for dbus-uuidgen to correct this issue.D-Bus not built with …

Jan 02, 2012 • 1 min read

TestDisk 6.12, Data Recovery Utility, May

TestDisk 6.12, Data Recovery Utility, May 2011Christophe GRENIER http://www.cgsecurity.orgTestDisk is free data recovery software designed to help recover lostpartitions and/or make non-booting disks bootable again when these symptomsare …

Jan 02, 2012 • 1 min read

android system and / remount

mount -o remount,ro -t yaffs2 /dev/block/stl9 /systemmount -o remount,rw -t yaffs2 /dev/block/stl9 /systemmount -o rw,remount -t rootfs /mount -o ro,remount -t rootfs /

Oct 07, 2011 • 1 min read

SELinux FTP Home dir write permission

Connected to 127.0.0.1.220 (vsFTPd 2.2.2)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (127.0.0.1:root): test1331 Please specify the password.Password:500 OOPS: …

Oct 04, 2011 • 1 min read

tacacs+ compile error

if you are getting this error when compiling tacacs+ , you should compile with --enable-maxsess option.gcc -DHAVE_CONFIG_H -I. -I/usr/local/include -g -O2 -pthread -MT maxsessint.o -MD -MP -MF .deps/maxsessint.Tpo -c -o maxsessint.o …

Aug 26, 2011 • 1 min read

gnokii sms read from Huawei Mobile Connect Express E800

[root@etugriceri ~]# gnokii --showsmsfolderstatusGNOKII Version 0.6.29No. Name Id #Msg========================================================0 Internal memory ME 11 Combined ME and SIM phonebook MT 12 SIM card SM 43 SMS Status Reports SR …

Jun 18, 2011 • 1 min read

ZFS deduplication test on Fedora 15 Linux

I recently tested ZFS deduplication test on Fedora 15 Linux. This is my test script. I tested only text file. For final report, other file format tests is unnecessary. [root@etugriceri fast]# du -ch 0/textfile 6.5K 0/textfile 6.5K total …

Mar 26, 2011 • 1 min read

Yum Proxy settings

[root@localhost ~]# vi /etc/yum.conf proxy=http://10.129.0.23:8080http_proxy=http://10.129.0.23:8080 [root@localhost ~]# declare -x ftp_proxy="http://10.129.0.23:8080"[root@localhost ~]# declare -x http_proxy="10.129.0.23:8080"

Jan 22, 2011 • 1 min read

SSL Weak Cipher and SSLv2 tests

echo 'GET HTTP/1.0' | openssl s_client -ssl3 -cipher LOW -connect www.tugriceri.com:443echo 'GET HTTP/1.0' | openssl s_client -ssl2 -cipher LOW -connect www.tugriceri.com:443echo 'GET HTTP/1.0' | openssl s_client -ssl2 -connect …

Jan 21, 2011 • 1 min read

Hide Apache version

vi httpd.confServerSignature OffServerTokens Prodapachectl restart

Jan 21, 2011 • 1 min read

LVM Create

1031 dmsetup ls --tree1040 dmsetup remove /dev/dm-11 (silinen partition ın dmden kalkmaması sebebi ile)1041 fdisk -l1044 pvcreate /dev/mapper/mpath111045 pvdisplay1046 vgcreate VolGroupBackup /dev/mapper/mpath111047 pvdisplay1048 …

Nov 26, 2010 • 1 min read

uvscan process is too slow

# time uvscan --versionMcAfee VirusScan Command Line for Linux64 Version: 6.0.3.356Copyright (C) 2010 McAfee, Inc.(408) 988-3832 LICENSED COPY - November 26 2010AV Engine version: 5400.1158 for Linux64.Dat set version: 5985 created May 17 …

Jul 26, 2010 • 1 min read

Multipath - Volume Groups

Multipath in SAN den diskleri hatalı gormesi sebebi ile volume gruplarda problem oluyor. Diskleri düzgün görmesi için config i flush layıp tekrardan dm leri oluşturmalı ve volume groupları tekrar enable etmeliyiz./sbin/multipath …

Apr 30, 2010 • 1 min read

crt to der

openssl x509 -in auth_tugriceri_com.crt -out auth_tugriceri_com.der -outform DERopenssl rsa -in www_tugriceri_com.key -outform DER -out www_tugriceri_com-der.key

Apr 30, 2010 • 1 min read

Opennms Reindex database

<font><font><font><font face="Arial, Helvetica, sans-serif">psql -d opennms -c “REINDEX DATABASE opennms FORCE” vacuumdb -v opennms -U opennms -W </font></font></font></font>

Jan 05, 2010 • 1 min read

Resize LV

pvresize -v -d /dev/dm-0vgdisplaylvextend -L400G /dev/VGD/datalvresize2fs /dev/VGD/datalve2fsck -f /dev/VGD/datalvresize2fs /dev/VGD/datalvmount /dev/VGD/datalv /mnt/data

Oct 17, 2009 • 1 min read

Sftp chroot settings

cat /etc/ssh/sshd_configSubsystem sftp internal-sftpMatch group sftponlyChrootDirectory /chrootX11Forwarding noAllowTcpForwarding noForceCommand internal-sftpcat /etc/passwdtestuser:x:500:504::/:/bin/bashsftponly:x:504:testuser

May 29, 2009 • 1 min read

Directory sync with rsync over ssh

<a name="linuxsvrhack-CHP-3-SECT-2">root@emre:~# <b class="emphasis-bold">rsync -ave ssh server:/opt/dir /opt</b></a>

May 20, 2009 • 1 min read

Transponder Lists for Kaffeine

There is a link that include transponder lists.http://www.fastsatfinder.com/transponders.htmlThis script will convert fastsatfinder's transponder lists to kaffeine format.I used 0130.ini file for Hotbird.cat 0130.ini | awk -F "=" '{print …

Apr 25, 2009 • 1 min read

Nec firmware update under linux

Nec firmware update under linuxPlease download necflash utility from http://binflash.cdfreaks.com/[root@frost local]# ./necflash -scanBinflash - NEC version - (C) by Liggy and HerrieVisit http://binflash.cdfreaks.comList of supported …

Apr 24, 2009 • 1 min read

Disabling the mode button on the catalyst devices

Disable the Express Setup feature so that the switch configuration cannot be deleted if the Mode button is mistakenly or maliciously pressed for 10 seconds. In order to disable the Express Setup feature, issue the "no setup express" command …

Apr 10, 2009 • 1 min read

How to test wbinfo_group.pl via command line

[root@proxy squid]# echo "emre Standard_Access" | /usr/lib/squid/wbinfo_group.pl -dDebugging mode ON.Got emre Standard_Access from squidStandard AccessUser: -emre-Group: -Standard Access-SID: …

Apr 08, 2009 • 1 min read

Domain join error

[root@px2 ~]# /usr/bin/net join -S 192.168.2.5 -U etadmin[2009/04/08 14:00:17, 0] param/loadparm.c:lp_do_parameter(7172)Enter etadmin's password:[2009/04/08 14:00:23, 0] libnet/libnet_join.c:libnet_join_ok(1035)libnet_join_ok: failed to get …

Mar 18, 2009 • 1 min read

other ssl issue with my own ca

/root/tugriceri.com_CA/ca/cat ca.conf[ ca ]default_ca = ca_default[ ca_default ]dir = /root/tugriceri.com_CA/ca/certs = /root/tugriceri.com_CA/ca/new_certs_dir = /root/tugriceri.com_CA/ca/ca.db.certsdatabase = …

Feb 11, 2009 • 1 min read

Snoop with ssg

SSGW-> snoop filter ip src-ip 192.168.1.2 dst-ip 192.168.5.6snoop filter addedSSGW-> snoopStart Snoop, type ESC or 'snoop off' to stop, continue? [y]/n ySSGW->SSGW-> clear dbufSSGW-> get dbuf stream...SSGW-> snoop off

Feb 03, 2009 • 1 min read

pfx to key

openssl pkcs12 -export -in my.pem -nodes -out my.pfx openssl pkcs12 -in my.pfx -out my-nodes.key -nodes -nocerts

Jan 13, 2009 • 1 min read

fast "show run"

conf#parser config cache interface #show runin privelege mode, type "term len 0" "show run" or "show start" will be faster "show run brief"

Jan 12, 2009 • 1 min read

Cisco SSH Configuration

conf# username cagri privilege 15 secret cisco"creates a user in local database with privelege level 15 and encrypted password cisco"conf#ip domain-name tugriceri.com"sets a domain name for the device"conf#crypto key generate rsa"creates a …

Dec 12, 2008 • 1 min read

Rsync Backup (with daemon option)

[root@srv ~]#vi /etc/xinetd.d/rsync "and change disable = yes to disable = no"[root@srv ~]#service xinetd restart[root@srv ~]#cat /etc/rsyncd.conf[GFS]path = /wwwroot/comment = Webrootauth users = rsyncsecrets file = /etc/rsync.secretsread …

Dec 07, 2008 • 1 min read

ssh Tunnel

shell# ssh -f root@192.168.2.54 -L 7200:192.168.2.54:7200 -N

Nov 21, 2008 • 1 min read

PRI Pinout

MB-M-YB-T-TB-Y-KB-KTB-T-YB-M-MB-Y-KB-K

Oct 04, 2008 • 1 min read

check: no loaded plugin implements 'check_main':

<i>check: no loaded plugin implements 'check_main': cannot scan! at</i><i> /usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/PerMsgStatus.pm line</i><i> 164.<br /><br />vi init.pre<br …

Oct 03, 2008 • 1 min read

Bir Asa log u

Routingfailedtolocatenexthopfor icmp from outside...Net1 de olması gereken bir host yada network net2 de tanımlanmış ise bu log ile karşılaşılır. Host u fln silip doğru yerde tanımlarını yapmak lazım.

Oct 03, 2008 • 1 min read

Cisco Asa ssh enable

username emre password pas priv 15aaa authentication ssh console LOCALssh x.x.x.x x.x.x.x external

Oct 03, 2008 • 1 min read

frontend problemi skystar2 ve fedora

scanning Turksat-42E using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' main:1882: FATAL: failed to open '/dev/dvb/adapter0/frontend0': 6 No such device or addressBu hata beni çıldırtmıştı. Çok uğraştırdı. Aslında sistemde …

Oct 03, 2008 • 1 min read

vdr2kaffeine

http://free.pages.at/cleditor/vdr2kaffh.htm

Oct 03, 2008 • 1 min read

Turksat-42.0E

/usr/share/dvb-apps/dvb-s/Turksat-42.0EBu dosya pek güncel değil. Bu dosyanınS 11594000 H 4557000 5/6S 10978000 V 2344000 3/4S 11096000 V 27500000 3/4S 11096000 V 27500000 5/6S 12652000 H 22500000 5/6S 12652000 H 22500000 3/4şeklinde …

Apr 14, 2008 • 1 min read

Citrix Netscaler backup script

Netscaler config lerini yedeklemek için yazdığım bir script belki birilerinin daha ihtiyacı vardır. shell # ./ceknsconfig.ex `date +%y%m%d-%N` şeklinde bir kullanımı var. Afiyet olsn. Emrehttp://www.tugriceri.com/getfile/ceknsconfig.ex

Feb 16, 2008 • 1 min read

Firefox ile java

Java firefox u indirip kurduğunuzu farzediyorum.ln -s /usr/java/latest/plugin/i386/ns7/libjavaplugin_oji.so .ile firefox plugin klasoru içerisine link i oluşturuyoruz.[root@etugriceri plugins]# firefoxVM did not start up properlyjava_vm: …

Jan 08, 2008 • 1 min read

Sudo requiretty settings

sudo: apache : sorry, you must have a tty to run sudo ; TTY=unknown ; .../var/log/secure içerisinde gözlemlenen bu log apache ile çağırılan bir sistem komutunun çalışmayıp verdiği uyarı log u .sudoers içerisindeDefaults requirettyayarının # …

Jan 04, 2008 • 2 min read

SSL sertifikası yaratma

Openssl ile sertifika yaratmak için yarattığınız anahtar dosya da güçlü şifreleme methodlarından birini seçerseniz sizden bir şifre girmenizi isteyecektir. Apache nin her başlamasında bu şifreyi yazmanız gerekmektedir. Şifre sorulmadan bir …

Jan 04, 2008 • 1 min read

Cer to Pem

You can convert cer file to pem with this example command. openssl x509 -in certnewb.cer -inform DER -out certnewb.pem -outform PEM if you have a Microsoft CA server and if you signed your certification request with this CA server, this …

Dec 26, 2007 • 1 min read

Making patch file

Creating patch file with diff. shell > diff -Naur old_file new_file > patch_fileshell > diff -Naur gazlo.pl gazlo_new.pl > gazlo.patchshell > patch < gazlo.patch Powered by ScribeFire.

Dec 26, 2007 • 1 min read

Compiling perl code

You can compile your perl codes with using perlcc. For example; shell > perlcc -B some.pl -o any.pl Powered by ScribeFire.

Dec 26, 2007 • 1 min read

Dovecot Error

imap-login: imap-login: error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory64 bitlik bir sistem üzerinde dovecot ta imap ile ssl i aktif ettiğim zaman üstteki uyarıyı …

Dec 24, 2007 • 1 min read

File Replace with sed

-i[SUFFIX], --in-place[=SUFFIX]edit files in place (makes backup if extension supplied)[root@etugriceri sil2]# sed -i 's/LAND/AIR/i' * Powered by ScribeFire.

Dec 24, 2007 • 1 min read

Fetchmail example

Example .fetchmailrc file ;[root@mail Maildir]# cat /root/.fetchmailrcdefaultsfetchallkeepset no bouncemailpoll 127.0.0.1 protocol IMAPuser efsaneuser@superdomain.com there with password xxxxx is efsane.user@superdomain.com heresmtphost …

Nov 19, 2007 • 1 min read

Qmail time stamps

tai64nlocalQmail log larındaki TAI64N timestamp değerlerini okunabilir formata çevirmektedir. Örnek olarak ; [root@mail smtp]# echo "@4000000037c219bf2ef02e94" | tai64nlocal 1999-08-24 07:04:05.787492500 cat @4000000047414fa33437fd14.s | …

Sep 22, 2007 • 1 min read

Php safe_mode

php_admin_flag safe_mode On safe_mode ile php, script in sahibi ile erişilmeye çalışılan dosya sahibini kontrol eder. Belirli bir directory deki scr çalışmaması için. php_admin_flag engine off Aynı şekilde safe_mode da uygulanabilir. …

Sep 16, 2007 • 1 min read

smtp-auth test with telnet

$wget http://www.infocopter.com/know-how/bin/mimencode $mv mimencode /bin $chmod 755 /bin/mimencode $ echo "user@domain.com\0user@domain.com\0password" | mimencode dXNlckBkb21haW4uY29tXDB1c2VyQGRvbWFpbi5jb21cMHBhc3N3b3JkCg== $telnet …

Sep 15, 2007 • 1 min read

Qmail finding configuration problems

Life with qmail It sometimes helps to run a service manually in order to find configuration problems. For example, if your qmail-smtpd/log service isn't running, do: cd /service/qmail-smtpd/log svc -d . ./run if no errors, enter a line of …

Sep 13, 2007 • 2 min read

File Systems form Gentoo page

Gentoo Linux Documentation -- Preparing the Disks Filesystems?The Linux kernel supports various filesystems. We'll explain ext2, ext3, ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux systems. ext2 is the tried …

Sep 12, 2007 • 1 min read

Gentoo Telnet

emerge telnet-bsdPro-Linux Sicherheitsservice: Gentoo - telnet-bsd The telnet-bsd telnet client is vulnerable to two buffer overflows, which could allow a malicious telnet server operator to execute arbitrary code. Powered by ScribeFire.

Sep 11, 2007 • 1 min read

proc mounts etc mtab

live cd src# grub-install /dev/hda df: warning:cannot read table of mounted filesystems:no such file or directory df: warning:cannot read table of mounted filesystems:no such file or directory could not find device /boot: not found or not a …

Sep 11, 2007 • 1 min read

Proc dev mount and chroot

srv# mount -t proc none /mnt/gentoo/proc srv# mount -o bind /dev /mnt/gentoo/devsrv# chroot /mnt/gentoo /bin/bashsrv# env-update && source /etc/profile Powered by ScribeFire.

Sep 11, 2007 • 1 min read

iptables ile Port Knocking

$IPTABLES -A INPUT -p tcp --dport 22 -m recent --rcheck --seconds 60 --name SSH -j ACCEPT$IPTABLES -A INPUT -p tcp --dport 21 -m recent --rcheck --seconds 60 --name SSH -j ACCEPT$IPTABLES -A INPUT -p tcp --dport 1599 -m recent --name SSH …

Sep 11, 2007 • 1 min read

RPM-PGP-KEY import

RPM-PGP-KEY import rpm --import /usr/share/doc/rpm-4.4.2/RPM-PGP-KEY Powered by ScribeFire.

Sep 11, 2007 • 1 min read

Mysql user priv.

mysql>GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'->IDENTIFIED BY 'some_pass' WITH GRANT OPTION; Powered by ScribeFire.