[HOW TO] list all cron jobs for all users

To show the list of cron jobs you can run crontab -l, which only shows the cronjobs of the current user. To list all cronjobs for all users you can write a bash script and run it as superuser:


#!/bin/bash
#List all cron jobs for all users
for user in `cat /etc/passwd | cut -d":" -f1`;
do 
crontab -l -u $user;
done

Site refer:  http://www.linux-faqs.info/bash/list-all-cron-jobs-for-all-users

Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success

[HOW TO] remove Java environment on Ubuntu/ Linux

On computer I installed Java 6 update 45 as default java environment. But ... one day you have to uninstall . Do you know the method to do?

Below step could be done like this:

#update-alternatives --remove "java" "/usr/lib/jvm/jre-6u45/bin/java"
#update-alternatives --remove "javac" "/usr/lib/jvm/jre-6u45/bin/javac"
#update-alternatives --remove "javaws" "/usr/lib/jvm/jre-6u45/bin/javaws"

Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success

 

[HOW TO] install Subversion/ Subclipse/ Eclipse Luna on Ubuntu

Install Subversion/ Subclipse for Eclipse Luna on Ubuntu

1. Download Eclipse here. Move it to /opt in case of me. Now I have /opt/eclipse-luna/
2. Install Java
3. Extract Eclipse Luna archive file.
4. Create a launcher shortcut for Eclipse Luna

vi /usr/share/applications/eclipse.desktop

Paste below content into:

[Desktop Entry]
Name=Eclipse 4
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse

Enjoy!

If you want to install plugin, please do as follows:

1. Open Eclipse Luna
2. Go to Help -> Install New Software. And then hit the "Add" button
3. Type the Name into Name field and Location, paster the link plugin. Example below:
Name: Subclipse 1.6.x
Location: http://subclipse.tigris.org/update_1.6.x

Please note, you must check version of eclipse luna to find the compatible version of plugin.

If you have different Eclipse or Subversion, check this link:
http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA


Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success

[HOW TO] disable Print Screen on Windows

1. Disable Print Screen

Create a *.reg:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,04,00,00,00,00,00,2a,e0,00,00,37,e0,\
00,00,54,00,00,00,00,00

Save as disable_print.reg and then run it to import to Windows registry. Reboot the computer to apply.

2. Enable Print Screen

Create a *.reg
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=-

Save as enable_print.reg and then run it to import to Windows registry. Reboot the computer to apply.

3. Disable Print Screen funtion in Windows
The "print screen funtion in Windows allows users to literally print whatever is on the computer screen. This funtion is a time-saver because instead of going through the process of launching the system print utility to print a Web page, you can just use the print screen tool. If you want to disable this feature, you can do as follows:
a. Click Start, then Run, and type gpedit.msc
b. Click to expand Computer Configuration, click to expand Administrative Templates, and then click Printers, select Disable Web-based Printing. The Windows "Print Screen" funtion will be disabled.

[HOW TO] disable/ remove Remote Desktop on Windows 7?

How to disable/ remove Remote Desktop on Windows 7?

Using Group Policy
1. Click Start, click Run, type gpedit.msc, and then click OK
2. In the Group Policy editor, click to expand Computer Configuration, click to expand Administrative Templates, click to expand Windows Components, and then click to expand Terminal Services
3. Double-click the Allow users to connect remotely using Terminal Services policy
4. Set the policy to Disable, and then click OK

Disable Remote Desktop features with Administrator privilege
1. Right-click My Computer, click Properties
2. Click the Remote tab
3. Click to clear Allow users to connect remotely to this computer, and then click OK. 

Also Group Policy
1. Click Start, click Run, type gpedit.msc, and then click OK
2. Click to expand User Configuration, click to expand Administrative Templates, click to expand System
3. Double-click Don't run specified Windows Application
4. Choose mstsc.exe

Unsitall Remote Desktop
1. Click Start, and then open Control Panel
2. Open "Add or Remove Programs or Programs and Features
3. Check Show Updates or View installed updated
4. Find the KB925876, and then click Remove
5. Restart computer to finish unistallation.

[HOW TO] add user to sudoes | sudoes files | grant user to sudo permission

Yesterday, a new member asked me that he must root permission to active do something on his computer.

A few second, I saw he is right. He is a technical engineer.

I add his user to /etc/sudoes files as below:

#User privilege specification
root ALL = (ALL) ALL
his_user ALL = (ALL) ALL 

with above, he still need to type the root's password to authenticate.

#User privilege specification
root ALL = (ALL) ALL
his_user ALL = (ALL) NOPASSWD:ALL

with above, he doesn't type the root's password.

With group, you also use as follows:
%group ALL = (ALL) NOPASSWD:ALL

Simply you must only follow this article. Now I' going to presentation of co-worker about Pandora. Beep :)


Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success

[HOW TO] fix Setup cannot continue because a more recent version of Internet Explorer is installed on your computer | Internet Explorer Did Not Finish Installing



Today the manager & boy-co-worker is going to Can Tho. Western girl welcome "baby" :)

Bull-shit!

I have just installed Internet Explorer 10 to Windows 7 64bit. Opps, I got the error pop-up:

Setup cannot continue because a more recent version of Internet Explorer is installed on your computer

Internet Explorer Did Not Finish Installing


Two above error are the same problem. IE could not install. How to resolve it?
You need to unistall clearly the last version installed. How to? Go Control Panel/ Programs and Features/


1. Turn Windows features on or off
Here you must uncheck Internet Explorer 10/11 (other). Click OK. Restart Windows.

2. Unistall or change program

Please find the IE existing here if any. Unistall it.

3. View installed updates

Re-check updated before which related Internet Explorer to unistall it.


Now you can install IE as you want.




Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success



[HOW TO] install Developement Tools RedHat, Debian

Sometimes you could not install application. The cause is missing dependencies package.


This article will be guide to install "Development Tools":

[root@tecmint Downloads]# yum groupinstall "Development tools" [On RedHat Systems] root@tecmint:~# apt-get install build-essential [On Debian Systems]

To check kernel header:
[root@tecmint Downloads]# rpm -qa | grep kernel-headers [On RedHat systems] root@tecmint:~# dpkg -l | grep linux-headers [On Debian systems]

To install kernel header:
[root@tecmint Downloads]# yum install kernel-devel [On RedHat Systems]



Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success

[HOW TO] start/stop/status ssh on systemd (fedora desktop 21) systemd

What is systemd? please refer here

I think you can confused. Systemd is a latest manage system of Linux.

In this article, I show you overview how to manage ssh on systemd.

Status:
[root@201407COM0047 itien]# systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled)
   Active: active (running) since Thu 2015-04-09 16:14:27 ICT; 5s ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 6893 (sshd)
   CGroup: /system.slice/sshd.service
           └─6893 /usr/sbin/sshd -D

Apr 09 16:14:28 201407COM0047 sshd[6893]: Server listening on 0.0.0.0 port 22.
Apr 09 16:14:28 201407COM0047 sshd[6893]: Server listening on :: port 22.


Start:
[root@201407COM0047 itien]# systemctl start sshd

Stop:
[root@201407COM0047 itien]# systemctl stop sshd

SSH will start on boot
[root@201407COM0047 itien]# systemctl enable sshd
Created symlink from /etc/systemd/system/multi-user.target.wants/sshd.service to /usr/lib/systemd/system/sshd.service.

SSH will not start on boot
[root@201407COM0047 itien]# systemctl disable sshd

Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success