Monday, August 24, 2015

How to set up a Samba file server to use with Windows 7

  How to set up a Samba file server to use with Windows 7

วิธีทำ
1. เซทค่าคอนฟิก samba configure ดังนี้
vim /etc/samba/smb.conf

# Global parameters
[global]
workgroup = workgroup
server string = Samba Server %v on %h
encrypt passwords = Yes
update encrypted = Yes
log level = 3
log file = /var/log/samba/%m.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
os level = 65
dns proxy = No
path = /data/user/pallet
admin users = @root, @adm
write list = @root,@adm
printer admin = @root, @adm
printing = lprng
dos filetimes = Yes
Dos filetime resolution = Yes
fake directory create times = Yes
security = users
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[Downloads]
comment = Share file for setup program
write list = user01,user02
path = /home/user/Downloads
force create mode = 0777
directory mask = 0775
valid users = user01,user02

หลังแก้ไขค่าคอนฟิกเสร็จ restart service samba ดังนี้
/etc/init.d/samba restart
2. สำหรับ Windows 7 กดที่ Windows start แล้วพิมพ์ local security เปิด Local Security Policy ดังภาพด้านล่าง

3. คลิ๊กตามลำดับดังนี้
3.1 หมายเลข 1 Security Options
3.2 หมายเลข 2 ดับเบิ้ลคลิ๊กNetwork security: LAN Management authentication level
3.2 หมายเลข 3 คลิ๊ก Drop list : Send LM & NTLM responses


























4. ดับเบิ้ลคลิ๊ก Network security: Minimum session security for NTLM SSP … คลิ๊กเครื่องหมายถูกออก ดังหมายเลข2




5. เรียกใช้งาน Share file samba ดังนี้ \\ip sharefile\sharefile


Sunday, August 23, 2015

Sunday, August 9, 2015

mount file iso on linux

  1. Create a directory to serve as the mount location:
    sudo mkdir /media/iso
    
  2. Mount the ISO in the target directory:
    sudo mount -o loop path/to/iso/file/YOUR_ISO_FILE.ISO /media/iso
    
  3. Unmount the ISO:
    sudo umount /media/iso

Monday, August 3, 2015

Mount disk volume (Centos) on linux debian

วิธีทำ
1. เปิด Terminal ใช้คำสั่ง vgdisplay ตรวจสอบ Disk volume

termcb:~ # vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 27.84 GB
PE Size 32.00 MB
Total PE 891
Alloc PE / Size 890 / 27.81 GB
Free PE / Size 1 / 32.00 MB
VG UUID ryYRi4-mXOd-XFaW-4xnR-h1cl-hphh-5QQnlM

2. ใช้คำสั่ง lvscan เช็คสถานะ Hard disk

termcb:~ # lvscan
inactive '/dev/VolGroup00/LogVol00' [26.06 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [1.75 GB] inherit

3. ใช้คำสั่ง ก่อน Mount disk

modprobe dm-mod
vgchange -ay

4. ใช้คำสั่งในข้อ 2. เช็คสถาน Hard disk อีกครั้ง จะพบว่า Disk Active

termcb:~ # lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [26.06 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.75 GB] inherit

5. Mount hard disk เพื่อใช้งาน


mount /dev/VolGroup00/LogVol00 /mount/point


Ref:   
http://pissedoffadmins.com/os/mount-unknown-filesystem-type-lvm2_member.html