sunog together with cdrecord

para masunog and datos sa isang cdrom, gamitin ang cdrecod

$man cdrecord

para malaman kung asan ang drive

#cdrecord –bangbus

# cdrecord -scanbus

para sunugin ang sako-sakong datos sa cdrom

# cdrecord -v -eject speed=4 dev=1,0,0 /mnt/images/boot.iso

kung saan:

  • speed = gaano kadalas ang ikot ng plato ng drive
  • dev = kung aling address ng bus ang gagamitin (maaring napakadami mong burning device)
  • /mnt/images/boot.iso = ang siyan sako-sakong datos na kailangan mo sunugin

para naman mabura ng mabilisan ang mga laman ng cd-rw mo

# cdrecord –dev=1,0,0 –blank=fast

sana may natulungan ako! hangang sa muli… paalam!

Mag-iwan ng Puna

File sharing via NFS (Debian Etch)

The Brew: Filesharing with NFS under Debian Etch

What we need

Server:

  • nfs-common
  • nfs-kernel-server
  • portmap

Client

  • nfs-common
  • portmap
  • * tried using it without these services, still works

Server config

main configuration file concerned:/etc/exports

mine read:

/osimages/centos5 10.10.10.0/24(ro,insecure,all_squash)

where:

/osimages/centos5 – shared directory

10.10.10.0/24 – allowed subnet to mount the above shared directory

(ro,insecure,all_squash) – options

The options determine how the client connection is handled:

  • ro – read only. rw – read/write. When a NFS share is read only, the client can not write changes to the NFS share.
  • secure,insecure – “secure” in this case means that the NFS server checks that the process on the client is running with root privileges. This prevents regular users on the client machine from bypassing file system permissions.
  • root_squash, no_root_squash, all_squash – by default, root on the client system is root on the server system. root_squash tells the server to treat root on the client as if it were nobody. all_squash maps all users to nobody.

 

Mounting it on the client

mount -t nfs 10.10.10.1:/osimages/centos5 /mnt/nfshare

resources

Mag-iwan ng Puna

Mysql password on a bash script.

Did this test, nothing fancy, a simple script which reads

 

#!/bin/bash
NUM=1
while [ $NUM != 0 ]; do
mysql -u conn -p123456 db1 -e “INSERT INTO populate VALUES ($NUM)”
let “NUM+=1″
done

Then while this was running, did some checking

[root@db1]# ps -ef | grep pop
root 8625 6729 1 14:51 pts/1 00:00:00 /bin/bash ./populate_sh
root 9043 8625 0 14:52 pts/1 00:00:00 mysql -u conn -px xxxxxx db1 -e INSERT INTO populate VALUES (418)
root 9045 5600 0 14:52 pts/0 00:00:00 grep pop

Notice that the password is masked. This is not saying that it is safe putting your mysql password on a bash script.

Just curious of this. Is the ps invocation insufficient? More on this when more time is available , in the meanwhile, some backup-recovery tests using LVM is in the brewing.

Mga Puna (1)

Follow

Get every new post delivered to your Inbox.