Sayfalar

14 Temmuz 2014 Pazartesi

Remote desktop Sharing in Ubuntu 14.04


Ubuntu 14.04 te aşağıdaki gibi vnc-viewer hatası alıyorsanız;  Vino require-encryption false yapmanız gerekebilir.


java.io.IOException: No security type suitable for RFB 3.3 supported


 you must to do step step in below
$ pkill vino
$ export DISPLAY=:0.0
$ /usr/lib/vino/vino-server &
still not working
after short investigation:


gsettings set org.gnome.Vino require-encryption false
now it`s work but i need it permanently  :))
Looks like something wrong with default gui smileLets install something else like dconf



sudo apt-get install dconf-tools
finally: dconf > desktop > gnome > remote-access > enabled - uncheck !!!
issue fixed.
Remote Desktop sharing working after reboot !!!
Maybe i use not correct way but to somebody it`s can be useful.:)

thanks :) good luck

http://discourse.ubuntu.com/t/remote-desktop-sharing-in-ubuntu-14-04/1640


11 Mart 2014 Salı

the file operations in Perl Script


sample perl program

open (DOSYAM, ">>./dosyam.dat") || die ("HATALI iSLEM..!");print DOSYAM "$FORM{'ad'}:$FORM{'email'}:$FORM{'not'}\n";
# yukarda bulunan : karakteri her alanı bir diğerinden ayırır.
# bu karakteri, alan ayıracı olarak kendimiz belirledik
close(DOSYAM);




9 Ocak 2014 Perşembe

ubuntu apache2 için ip adress bloklama

ilk olarak
apache config dosyasını açın apache2.conf
genelde (/etc/apache2/apache2.conf)

sudo vi  /etc/apache2/apache2.conf


alt satıra kopyalayın (added)


 

 :wq! ##kaydedip cıkın
dikkat edin arada boşlular olmasın... restart olurken hata labilirsiniz..

daha sonra
sudo /etc/init.d/apache2 restart


sonra
sudo service httpd restart


###bitti###

hepsi bu kadar.

belirtilen ip adreslerinden artık apache uygulamanıza bağlanamazlar

2 Ocak 2014 Perşembe

açık portaları listeleme ve port üzerinden PID öğrenme

lsof -i TCP|fgrep LISTEN | grep dataserve



ve

korn shell için şu şekilde bir script yazılabilir.

#!/bin/ksh

line='---------------------------------------------'
pids=$(/usr/bin/ps -ef | sed 1d | awk '{print $2}')

if [ $# -eq 0 ]; then
   read ans?"Enter port you would like to know pid for: "
else
   ans=$1
fi

for f in $pids
do
   /usr/proc/bin/pfiles $f 2>/dev/null | /usr/xpg4/bin/grep -q "port: $ans"
   if [ $? -eq 0 ]; then
      echo $line
      echo "Port: $ans is being used by PID:\c"
      /usr/bin/ps -ef -o pid -o args | egrep -v "grep|pfiles" | grep $f
   fi
done
exit 0

diskten boot ederek çalıştırma

aşağıdaki komut ile kopyalama yapılırsa bilgisayar diskten boot ederek çalışır..

df -h ile sdb mi flash diskin ona bak

 sudo dd if=ubuntu-12.10-desktop-amd64.iso of=/dev/sdb

tcpdump ile broadcats yayın yapan sql sorgularının yakalanması


diğer database kullanıcıları için ilk olarak şu şekilde çalıştırılabilir

 # tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings 




 >>>>>>mysql database için sorgu

# tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e '
while(<>) { chomp; next if /^[^ ]+[ ]*$/;
if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER)/i) {
if (defined $q) { print "$qn"; }
$q=$_;
} else {
$_ =~ s/^[ t]+//; $q.=" $_";
}
}'

Sybase rep server connection subscription definition

---- primary database de

sp_setreptable mytable,"true"
go
sp_addlogin PEKTAS_maint,PEKTAS_maint_ps

grant role sa_role to PEKTAS_maint

grant role replication_role to PEKTAS_maint

isql -Usa -SPEKTAS -DPEKTAS  -i rs_install_primary.sql


--- rep server da
create connection to PEKTAS.PEKTAS
set error class to rs_sqlserver_error_class
set function string class to rs_sqlserver_function_class
set username to PEKTAS_maint
set password to ******
with log transfer on    --- connection primary db ye ise olmalı.WS da ise iki tarafta da olmalı

create user rep_user_PEKTAS set password *******
go
grant connect source to rep_user_PEKTAS
go

create replication definition repdef_PEKTAS
with primary at PEKTAS.PEKTAS
with all tables named mytable(id int, a varchar(15) ,b varchar(15) )
primary key (id)

create connection to sPEKTAS.PEKTAS
set error class to rs_sqlserver_error_class
set function string class to rs_sqlserver_function_class
set username to PEKTAS_maint
set password to *****
with log transfer on


create subscription sub_PEKTAS
for repdef_PEKTAS
with replicate at sPEKTAS.PEKTAS

admin who_is_down

---prim database
sp_configure "enable rep agent threads",1

sp_config_rep_agent PEKTAS,enable,'PRS','rep_user_PEKTAS','*******'

------secondary database de

sp_addlogin PEKTAS_maint,******
go
sp_addalias "PEKTAS_maint","dbo"
go

sp_start_rep_agent PEKTAS


--------------------------****bittiiii********-------------

--subscription drop
drop subscription sub_name
for repdef_name
with replicate at ds.db
with purge  --secondary tabloyu truncate eder
without purge --secondary ve primary tabloyu aynen birakir

--checking subscription
check subscription sub_name
for repdef_name
with replicate at ds.db



create connection to peliste.pdb
set error class to rs_sqlserver_error_class
set function string class to rs_sqlserver_function_class
set username to PEKTAS_maint
set password to *******
with log transfer on    --- connection primary db ye ise olmalı.WS da ise iki tarafta da olmalı
GO



----AFET çalısma



create database replication definition DATABASEYONET_rep_def
with primary at DATABASEYONET.DATABASEYONET
replicate ddl
replicate system procedures


create   connection to raporAFET.DATABASE_NAME
SET error class to rs_sqlserver_error_class
set function string class to rs_sqlserver_function_class
set username to DATABASE_NAME_maint
set password to *******

define  subscription DATABASE_NAME_konya_sub
for database replication definition DATABASE_NAME_repdef
with primary at SERVERNAME.DATABASE_NAME
with replicate at raporAFET.DATABASE_NAME
use dump marker