Thursday 13 December 2012

Linux Tips and Tricks

## To view detailed hardware info in linux
root# dmidecode                               # To get hardware info of system in Linux

root# dmidecode -t 2                        # To get CPU info

root# dmidecode -t 17                      # To get ram modules info

## To view network info and traffic capturing  
root# ifconfig -a                               # To get Ethernet card info

root# tcpdump -i eth0                      # To capture Ethernet traffic

Thursday 6 December 2012

REPAIR MBR OF WIN 7

Boot from windows 7 dvd

Choose your default "Language," "Time" and "Keyboard Input" on the first window and click "Next."

Click on the "Repair Your Computer" option to gain access to the System Recovery window.
 

Now choose "Command Prompt" to run the Bootsect.exe utility. Bootsect is located inside the boot folder so change your directory to boot. Now run "bootsect /nt60 C:\" (without quotes)
 

if you had Windows 7 initially installed in the C partition. Alternatively, you can run "bootsect /nt60 SYS" or "bootsect /nt60 ALL" (without quotes) to repair the system partition or all partitions.
 

Eject the DVD and restart your computer. Your computer should now boot Windows 7 again.

bootsect /nt52 | /nt60  SYS|ALL|C:\  /force| /mbr

Monday 3 December 2012

SAMBA SHARE MULTIUSER MULTIGROUP WITH QUOTA

UBUNTU SAMBA  MULTIUSER MULTIGROUP SHARE FOLDER WITH QUOTA
## Skip this step if you already upgraded apt-get update && apt-get upgrade && echo $?

apt-get install samba && echo $?

groupadd share


mkdir /share

chmod 3770 /share

chown root:share /share/
or
chgrp share /share

### Add IT group and directory
groupadd IT && mkdir /share/IT && chmod 3770 /share/IT && chgrp IT /share/IT/ && echo $?

useradd -d /share/IT/ -s /sbin/nologin
-g share -G IT -M user1

smbpasswd -a user1

### nano /etc/samba/smb.conf
# add below lines at the end of file


[share]
path = /share/
comment = samba share for company files
valid users = user1 user2 user3 user4
public = no
writable = yes
printable = no
create mask = 770
directory mask = 3750
force directory mode = 3750

inherit permissions = yes


## Restart the samba 
service smb restart

Quota Configuration
## install quota
apt-get install quota

nano /etc/fstab
#add below line at the end
/dev/sda1      /               ext4    errors=remount-ro,usrquota,grpquota 0       1

## Remount the file system
mount -o remount /

## it will set 5GB soft limit and 6GB hard limit
quotatool -u user1 -bq 5000Mb -l "6000 Mb" / -v

Cheapest Android Phone

Another Block Buster Android Dual Sim 2G/3G Phone by Pakistani Company Qmobile



















Battery  1800mAh, Talk time Up to 5 h, Stand-by Up to 180 h  
 OS  Android OS, v4.0.4 (Ice Cream Sandwich) 
 Memory  4GB built-in, 512MB RAM, microSD card 4GB included (supports up to 32GB) 
 Processor  Dual-core 1 GHz MediaTek MT6577 + PowerVR SGX531 GPU 
 Connectivity  Bluetooth v3.0 with A2DP, USB, WLAN (Wi-Fi 802.11 b/g/n, Wi-Fi hotspot), GPRS Class 12 (48 kbps), EDGE Class 12, 3G  
 Display Size  480 x 854 pixels, 5.0 inches (~196 ppi pixel density),
Sensors: Accelerometer, proximity  
 Display Colour  IPS LCD capacitive touchscreen, 16M colors, Touch-sensitive controls, Multitouch  
 Operating
 Frequency / Band 
SIM 1: 850 / 900 / 1800 / 1900 (HSDPA 850 / 900 / 1900 / 2100)
SIM 2
: 850 / 900 / 1800 / 1900 (HSDPA 850 / 900 / 1900 / 2100)  
 Browser HTML5  
 Colors Black, White  
 Entertainment  FM radio, 3.5mm audio jack, MP4/WMV/H.264/H.263 player, MP3/AAC/WMA/WAV player, SNS integration, Google Talk, Games (built-in + downloadable)  
 Camera  8MP, 3264x2448 pixels, autofocus, Dual-LED flash, Geo-tagging, touch focus, face detection, Video, 1.3MP Secondar Camera 
 Other Features  Dual SIM, GPS + A-GPS support, MicroSIM card support only, Google Search, Maps, Gmail, Youtube, Calendar, Speakerphone