#!/bin/sh # This is some secure program that uses security. VALID_PASSWORD="secret" #this is our password. echo "Please enter the password:" read PASSWORD if [ "$PASSWORD" == "$VALID_PASSWORD" ]; then echo "You have access!" else echo "ACCESS DENIED!"
Karşılaştırma:
| -eq | equal to |
| -ne | not equal to |
| -lt | less than |
| -le | less than or equal to |
| -gt | greater than |
| -ge | greater than or equal to |
Dosya işlemleri:
| -s | file exists and is not empty |
| -f | file exists and is not a directory |
| -d | directory exists |
| -x | file is executable |
| -w | file is writable |
| -r | file is readable |
solution:
access to *
by self write
by users read
by anonymous auth
vnc ile bağlanmak istediğim kullanıcı adı oracle, aşağıdaki komutları kendi kullanıcıza göre düzelemelisiniz,
[root@ares log]# cat /etc/redhat-release CentOS release 5.7 (Final) [root@ares ~]# yum install vnc-server [root@ares ~]# echo 'VNCSERVERS="1:oracle"' >> /etc/sysconfig/vncservers [root@ares ~]# echo 'VNCSERVERARGS[1]="-geometry 1024x768"' >> /etc/sysconfig/vncservers [root@ares ~]# mkdir /home/oracle/.vnc [root@ares ~]# echo '#!/bin/sh' >> /home/oracle/.vnc/xstartup [root@ares ~]# echo exec /etc/X11/xinit/xinitrc >> /home/oracle/.vnc/xstartup [root@ares ~]# chmod +x /home/oracle/.vnc/xstartup [root@ares ~]# chown -R oracle /home/oracle/.vnc [root@ares ~]# su - oracle [root@ares ~]$ vncpasswd [root@ares ~]# su - [root@ares ~]# service vncserver start
source.list dosyasını düzenleyerek aşağıda yer alan ilgili satırları ekliyoruz:
sudo gedit /etc/apt/sources.list
seçiminize göre aşağıdaki satırları ekleyerek dosyayı kaydediyoruz.
ubuntu 9.04:
deb http://www.pvv.ntnu.no/~knuta/xmms/jaunty ./ deb-src http://www.pvv.ntnu.no/~knuta/xmms/jaunty ./
ubuntu 8.04:
deb http://www.pvv.ntnu.no/~knuta/xmms/hardy ./ deb-src http://www.pvv.ntnu.no/~knuta/xmms/hardy ./
Update ve install xmms
sudo apt-get update sudo apt-get install xmms