"Remote" tab missing in My Computer properties
VirtualBox Installation crashes with 'IOError: [Errno 30] Read-only file system'
Recently I tried to install Redhat Linux in Virtualbox, however I got the below error.
By default the hard drive I created was a SATA HD, the workaround is to create a IDE hard drive instead and make it as Primary Master ID. This could be a bug in Virtualbox
OpenWRT for TL-WA801ND V2
I bought a TL-WA801ND router with version 2.1, unfortunately DD-WRT doesn't support it and OpenWRT only support version 1. After a few hours googling and retrying, I finally had the OpenWRT installed onto the router.
Thanks to TasksOfOhm who provided an awesome tutorial and binaries for TL-WA801ND. Please refer to the below link for more information:
I downloaded below ROM and flashed it into the router using the original web admin interface.
Below are the errors I had and the ways to fix it. Please note that if you download a different ROM other than r41150 you may not experience the below errors
After the router is flashed and rebooted, I typed in 192.168.1.1 and got the below errors:
- /usr/lib/lua/luci/dispatcher.lua:211: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback: [C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:211: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:195: in function
The above error occurred because /etc/config/luci does not exist. You will need to create this file yourself. To do this:
- Telnet 192.168.1.1 to access your router. By default, telnet access is enabled and ssh is disabled so no pasword is needed. Please set the password here then access it via ssh
- create /etc/config/luci file and copy the below content in:
- config core 'main'
option lang 'auto'
option mediaurlbase '/luci-static/openwrt.org'
option resourcebase '/luci-static/resources'
config extern 'flash_keep'
option uci '/etc/config/'
option dropbear '/etc/dropbear/'
option openvpn '/etc/openvpn/'
option passwd '/etc/passwd'
option opkg '/etc/opkg.conf'
option firewall '/etc/firewall.user'
option uploads '/lib/uci/upload/'
config internal 'languages'
option en 'English'
option 'zh_cn' 'SimpChinese'
config internal 'sauth'
option sessionpath '/tmp/luci-sessions'
option sessiontime '3600'
config internal 'ccache'
option enable '1'
config internal 'themes'
option OpenWrt '/luci-static/openwrt.org'
option Bootstrap '/luci-static/bootstrap' - Save the file and retry visiting 192.168.1.1, now I am getting
-
/usr/lib/lua/luci/dispatcher.lua:284: No valid theme found stack traceback: [C]: in function 'assert' /usr/lib/lua/luci/dispatcher.lua:284: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:195: in function
- opkg install luci-theme-bootstrap_svn-r10375-1_ar71xx.ipk
Build failure using gradlew: "Could not resolve all dependencies for configuration ':app:_debugCompile'
I was trying to build my project with Gradle in Android Studio, then I had the above error.
To resolve this I had to use the Android SDK Manager to install "Android Support Repository". After that the project was rebuilt successfully.
Outlook unable to search emails downloaded from Google Apps Sync
If you have Google Apps Sync installed to download the emails from Google Mail and you are not able to search the emails, the method below may help you to resolve the problem:
Environment: Windows 7 + Outlook 2010
Problem: Try to use the search box within Outlook to search the emails, it
keeps giving nothing and the index status is showing nothing to be indexed
If the above registry subkey "Windows Search" is not there, please create it and create PreventIndexingOutlook entry in there and set it to 0.
Exit the Registry and try to search now in Outlook.
Reference: http://support.microsoft.com/kb/972814/en-au
can't open or create /var/run/crond.pid: No space left on device
This error message told us that there is no disk space left on /var
When we run "df -h" on the system we get:
[root@A5AFETTASB pats]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p3 3.0G 1.7G 1.2G 59% /
/dev/cciss/c0d0p1 99M 15M 80M 16% /boot
/dev/cciss/c0d0p6 24G 5.9G 17G 27% /opt
none 1.3G 0 1.3G 0% /dev/shm
/dev/cciss/c0d0p5 2.0G 1.1G 790M 59% /var
Seems like only 59% disk space is used but that is not true. As the difference here is MB of space versus the almighty inode. So if we try using "df -i", we get:
[root@A5AFETTASB pats]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/cciss/c0d0p3 393600 95644 297956 25% /
/dev/cciss/c0d0p1 26104 40 26064 1% /boot
/dev/cciss/c0d0p6 3123232 12620 3110612 1% /opt
none 322278 1 322277 1% /dev/shm
/dev/cciss/c0d0p5 262144 262144 0 100% /var
Further investigation showed, there are huge number of files created under /var/spool/clientmqueue that caused the problem:
[root@A5AFETTASB pats]# du -h /var/spool/*
4.0K /var/spool/at/spool
8.0K /var/spool/at
1.1G /var/spool/clientmqueue
12K /var/spool/cron
4.0K /var/spool/cups/tmp
8.0K /var/spool/cups
4.0K /var/spool/lpd
8.0K /var/spool/mail
4.0K /var/spool/mqueue
4.0K /var/spool/repackage
4.0K /var/spool/rwho
4.0K /var/spool/samba
4.0K /var/spool/up2date
4.0K /var/spool/vbox
If you don't care about the content you can simply delete the files, but
you should ask yourself why you have tons of messages in that
directory.
# rm -rf /var/spool/cilentmqueue
# mkdir /var/spool/cilentmqueue
# chown smmsp:smmsp /var/spool/cilentmqueue
If the emails are the result of crontab, below will explain how to disable it:http://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/
In this case the problem caused by sendmail. If you don't use it we can just disable the service
# svcs sendmail
STATE STIME FMRI
disabled Sep_15 svc:/network/smtp:sendmail
Or you should probably enable it just to make sure that at and cron job output is delivered. You can configure sendmail such that it doesn't accept remote SMTP connections.
How to block/unblock an IP from Linux?
In order to block an IP on your Linux server you need to use iptables tools (administration tool for IPv4 packet filtering and NAT) and netfilter firewall. First you need to log into shell as root user. To block an IP address you need to type the iptables command as follows:
Syntax to block an IP address under Linux
iptables -A INPUT -s IP-ADDRESS -j DROP
Replace IP-ADDRESS with your actual IP address. For example, if you wish to block an ip address 65.55.44.100 for whatever reason then type the command as follows:
# iptables -A INPUT -s 65.55.44.100 -j DROP
If you have IP tables firewall script, add the above rule to your script.
If you just want to block access to one port from an ip 65.55.44.100 to port 25 then type command:
# iptables -A INPUT -s 65.55.44.100 -p tcp --destination-port 25 -j DROP
The above rule will drop all packets coming from IP 65.55.44.100 to port mail server port 25.
CentOS / RHEL / Fedora Block An IP And Save It To Config File
Type the following two command:# iptables -A INPUT -s 65.55.44.100 -j DROP
# service iptables save
How Do I Unblock An IP Address?
Use the following syntax (the -d options deletes the rule from table): # iptables -D INPUT -s xx.xxx.xx.xx -j DROP
# iptables -D INPUT -s 65.55.44.100 -j DROP
# service iptables save
Copy and paste text with vi or vim
The command ‘Y’ or ‘yy’ copies (yanks) one or more lines. To copy one line, two lines, 10 lines, and all lines to the end of the file, respectively:
Y
2Y
10Y
yG
To paste the text contained in the buffer above (uppercase P) or below the current cursor position (lowercase p), respectively:
P
p
It is also possible to yank text within a line. The following commands yank text from the current cursor position to the end of the word and the end of the line, respectively:
yw
y$
The same commands paste the text within a line. Lower case p pastes after the cursor position and upper case P pastes before.
Paste will also work with deleted text, either lines or parts of lines. Be careful not to execute any other commands prior to pasting as this will empty the buffer.
How to mount the red hat linux iso files
If you want to mount the Red Hat ISO files (in order, for example, to view their content), you should use the following command: mount -r -t iso9660 -o loop -vReplace with the full path & name of your ISO file and with a mount point (e.g., '/mnt/iso').
Adding VNC Server to Red Hat Enterprise Linux 6.x
In many Linux distributions, a VNC server is installed by default,
but with Red Hat Enterprise Linux 6.x the package must be manually
added.
Remove files older than 7 days - Linux
The Linux find command has several different uses. One of these uses is to remove files that are older than x amount of days.
This particularly useful when we want to clear down trace files
that have been building up over time. To do this we can access to the
oracle bdump directory, then execute the following command line code:
$ find *.trc -mtime +7 -exec rm {} \;
The above code will remove all trace files in the current directory that are older than 7 days.Code breakdown
find -mtime + -exec \;
Find
– finds the files specified by the filename-mtime +
– days older than current system date-exec
– command to execute with found filesFurther reading
It is possible to execute different commands upon found files, however this is outside the scope of this post. For more information on the find command please see the find man pages: Find Man Page