[HOW TO] Can not remote desktop to Windows Server 2008 | fix rdesktop disconnect: disconnect: Internal licensing error when connecting to Windows Server 2008 on Ubuntu/Debian

Hello,



I think I must go to sleep. But I want to share somsthing continuous.


If you are using Linux operating system, I think you can also use rdesktop utility to remote desktop to Windows Machine.

The problem is here. If rdesktop version is 1.7.0 or less that when it remote desktop to Windows Server 2008 or 2008 R2, it get an error as below:

$ rdesktop 192.168.2.5 -g 1280x768 -a 8
Autoselected keyboard map en-us
disconnect: Internal licensing error.

Root cause that the licensing mode is set to "per device" or link. You can either set the licensing mode to "per user" or you install rdesktop 1.7.1. The rdesktop 1.7.1 includes a patch for the problem connecting to 2008 terminal servers with "per device" licensing.

Okay, we have 4 solutions to resolution for this case.



Solution 1:


$sudo -s


#chown -R root:root /home/$user/.rdesktop

#chmod -R 444 /home/$user/.rdesktop

Then just delete the license via command:

#cd /home/$user/.rdesktop

#rm -f *

You are trying to connact to a Windows Machine and enjoy :D


Solution 2:


You must install the rdesktop 1.7.1 from source code


$sudo apt-get install libx11-dev libssl-dev

$wget http://iweb.dl.sourceforge.net/project/rdesktop/rdesktop/1.7.1/rdesktop-1.7.1.tar.gz

$tar -zxvf rdesktop-1.7.1.tar.gz

$cd rdesktop-1.7.1

$./configure

$make

$make install

Or use apt-get to install

$sudo apt-get install rdesktop 

It will be installing the rdesktop installation latest version (maybe 1.7.1 if your repository is latest)


Solution 3:


#cd /home/$user/.rdesktop


#rm -rf *

Again re-remote desktop


Solution 4:


#cd /home/$user/


#rm -rf .rdesktop

#touch .rdesktop

rdesktop will complain that rdesktop isn't a directory, but it will connect anyway.



You also go to rdesktop's home page to download lastest version http://www.rdesktop.org/

Enjoy :)




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 GIT to create and share the project on GitHub

Do you have an GitHub account at http://github.com?

Everyday, you're using Linux operating system. You always install/ combine application, source code on Linux. You should create an account and upload that repository to GitHub.

GIT is a distributed version control system that was created by Linus Torvalds, the mastermind of Linux itself. It was designed to be a superior version control system to those that were readily available, the two most common of these being CSV and SVN.

CVS and SVN use the Client/Server model for their systems, GIT operates a little differently. Instead of downloading a project, making changes, and uploading it back to the server, GIT makes the local machine act as a server.

You download the project with everything, the source files, version changes. Once you are finished, you then merge the project back to the repository.

The article is interesting! I think I should write a tutorial for GIT.

Okay, let's go,

Firstly you must create an account at http://www.github.com

On Debian/ [Ku/Xu/Lu]Ubuntu/ Linux Mint, you can install it using apt-get command

$sudo apt-get install git

You also install from source

$ wget http://kernel.org/pub/software/scm/git/git-1.8.4.tar.bz2 
$ tar xvjf git-1.8.4.tar/bz2 
$ cd git-* 
$ ./configure 
$ make 
$ make install

Now that GIT is installed. In your home directory, there will be a file called ~/.gitconfig. This holds all of your repository information. Let's give it your name and your email.

$git config --global user.name "Your Name"
$git config --global user.email "yourmail@yourdomain.com"

We are going to create the first repository. You make any directory a GIT repository. You use cd command to come it and do the following:

$cd /home/ali33/heineken/
$git init

In this directory, a new hidden directory has been created called ".git". This directory is where GIT stores all of its information about your project. If you dele this directory:

$rm -rf .git

You create a file about your project (e.g. rocky.info)

$vi rocky.info

Added the "rocky.info" file to yuor GIT project.

$git add rocky.info

If you want to add all of file/folder in the project, you use command as below:

$git add .

Now you are ready to commit the project to a stage, meaning that this is a marker point in the project. You do this with the git commit "-m" command where the "-m" option specifies a message you want to give it.

$git commit -m 'first project'

Okay, you are ready to push the project up to GitHub. You will need the login information that you made then created an account.

$git remote set-url origin your_user@github.com:your_uer/repository/
$git push origin master

That's it! Now you can go the https://github.com/username/ropository link to see your own git project.

You also config the git configuration via command:

$git config -e

Or go to source path:

$sudo -s
#cd /tmp/github/.git
/tmp/github/.git#
/tmp/github/.git#ls -al
total 44
/tmp/github/.git#drwxr-xr-x 7 root  root  4096 Dec 26 19:25 .
/tmp/github/.git#drwxrwxr-x 3 ali33 ali33 4096 Dec 26 18:47 ..
/tmp/github/.git#drwxr-xr-x 2 root  root  4096 Dec 26 18:40 branches
/tmp/github/.git#-rw-r--r-- 1 root  root   259 Dec 26 19:35 config
/tmp/github/.git#-rw-r--r-- 1 root  root    73 Dec 26 18:40 description
/tmp/github/.git#-rw-r--r-- 1 root  root    23 Dec 26 18:40 HEAD
/tmp/github/.git#drwxr-xr-x 2 root  root  4096 Dec 26 18:40 hooks
/tmp/github/.git#-rw-r--r-- 1 root  root   104 Dec 26 18:48 index
/tmp/github/.git#drwxr-xr-x 2 root  root  4096 Dec 26 18:40 info
/tmp/github/.git#drwxr-xr-x 5 root  root  4096 Dec 26 18:48 objects
/tmp/github/.git#drwxr-xr-x 4 root  root  4096 Dec 26 18:40 refs
/tmp/github/.git#vi config

If you don't upload to GitHub and received error such as:

#git push origin master
Assh: connect to host github.com port 22: Connection timed out

You must check to ensure port 22 local is opened


#nc -v -z 127.0.0.1 22

Connection to 127.0.0.1 22 port [tcp/ssh] succeeded!


Okay, the port 22 ready. You should contact network administrator. Because network don't allow port 22 for you, for your department.

Understandable, it is a master of security infrastructure businesses. Thay need to ensure a minimum of things that can go internet.

That's it. I'm going to sleep :D see you.

P/s: big thank tecmint.com that sharing.




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] skeleton directory /etc/skel?

Hello,


Heineken: Do you want to ensure that all new uers on your computer get the same initial settings?

Tiger: Yes, sometimes I want it. Can you help me?

Heineken: Yup, I'm here to help you :D

Tiger: oh that's sound good. Let's go,

Heineken: Okay buddy,

The (skeleton) /etc/skel directory contains files and folders that will be copied in the new user's home directory (login directory) that when user is created with useradd/adduser command.

root@ubuntu01-virtual-machine:/home/ubuntu01# adduser temp4
Adding user `temp4' ...
Adding new group `temp4' (1003) ...
Adding new user `temp4' (1003) with group `temp4' ...
Creating home directory `/home/temp4' ...

Copying files from `/etc/skel' ...

By default, some configuration files usually place in the /etc/skel:


  • /etc/skel/.bash_logout
  • /etc/skel/.bashrc
  • /etc/skel/.profile
In the position user is deleted, the data inside the /etc/skel remains unchanged.


root@ubuntu01-virtual-machine:~# cd /etc/skel/
root@ubuntu01-virtual-machine:/etc/skel# mkdir heineken
root@ubuntu01-virtual-machine:/etc/skel# useradd -m -d /home/heineken temp3
root@ubuntu01-virtual-machine:/etc/skel# 
root@ubuntu01-virtual-machine:/etc/skel# ls -al /home/heineken/
total 36
drwxr-xr-x 3 temp3 temp3 4096 Th12 23 01:05 .
drwxr-xr-x 5 root  root  4096 Th12 23 01:05 ..
-rw-r--r-- 1 temp3 temp3  220 Th03 30  2013 .bash_logout
-rw-r--r-- 1 temp3 temp3 3637 Th03 30  2013 .bashrc
-rw-r--r-- 1 temp3 temp3 8942 Th04 17  2013 examples.desktop
drwxr-xr-x 2 temp3 temp3 4096 Th12 23 01:05 heineken
-rw-r--r-- 1 temp3 temp3  675 Th03 30  2013 .profile
root@ubuntu01-virtual-machine:/etc/skel# cd /etc/skel/
root@ubuntu01-virtual-machine:/etc/skel# ls
examples.desktop  heineken
root@ubuntu01-virtual-machine:/etc/skel# cd heineken/
root@ubuntu01-virtual-machine:/etc/skel/heineken# touch example
root@ubuntu01-virtual-machine:/etc/skel/heineken# touch example1
root@ubuntu01-virtual-machine:/etc/skel/heineken# ls
example  example1
root@ubuntu01-virtual-machine:/etc/skel/heineken# 
root@ubuntu01-virtual-machine:/etc/skel/heineken# 
root@ubuntu01-virtual-machine:/etc/skel/heineken# passwd temp3
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
root@ubuntu01-virtual-machine:/etc/skel/heineken# 
root@ubuntu01-virtual-machine:/etc/skel/heineken# 
root@ubuntu01-virtual-machine:/etc/skel/heineken# ls -al /home/heineken/
total 36
drwxr-xr-x 3 temp3 temp3 4096 Th12 23 01:05 .
drwxr-xr-x 5 root  root  4096 Th12 23 01:05 ..
-rw-r--r-- 1 temp3 temp3  220 Th03 30  2013 .bash_logout
-rw-r--r-- 1 temp3 temp3 3637 Th03 30  2013 .bashrc
-rw-r--r-- 1 temp3 temp3 8942 Th04 17  2013 examples.desktop
drwxr-xr-x 2 temp3 temp3 4096 Th12 23 01:05 heineken
-rw-r--r-- 1 temp3 temp3  675 Th03 30  2013 .profile


Heineken: Tiger, do you understand?
Tiger: I understand, but .... I want to change the location of /etc/skel. Can you help me?
Heineken: oh cool! I can do it.

You use vi command to edit the /etc/default/useradd

# Default values for useradd(8)
#
# The SHELL variable specifies the default login shell on your
# system.
# Similar to DHSELL in adduser. However, we use "sh" here because
# useradd is a low level utility and should be as general
# as possible
SHELL=/bin/sh
#
# The default group for users
# 100=users on Debian systems
# Same as USERS_GID in adduser
# This argument is used when the -n flag is specified.
# The default behavior (when -n and -g are not specified) is to create a
# primary user group with the same name as the user being added to the
# system.
# GROUP=100
#
# The default home directory. Same as DHOME for adduser
# HOME=/home
#
# The number of days after a password expires until the account
# is permanently disabled
# INACTIVE=-1
#
# The default expire date
# EXPIRE=
#
# The SKEL variable specifies the directory containing "skeletal" user
# files; in other words, files such as a sample .profile that will be
# copied to the new user's home directory when it is created.
# SKEL=/etc/skel
#
# Defines whether the mail spool should be created while
# creating the account

# CREATE_MAIL_SPOOL=yes


Heineken: Tiger, okay, are you ready? If you have any question, please call me via 113 =)))))
Tiger: :D




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


[WHAT] The port number?

The port numbers are divided into three ranges: the Well Known Ports, the Registered Ports, and the Dynamic and/or Private Ports. There are two types of ports, using two different protocols: 
TCP and UDP. Although they are different protocols, they can have the same port number. The Well Known Ports are those from 0 through 1023, the Registered Ports are those from 1024 through 49151 and the Dynamic and/or Private Ports are those from 49152 through 65535.




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] enable IPv4 forwarding support on CentOS/Redhat Linux

Hello Guys,

Question: Hey Guys, what are you doing?

Answer: humnnn, I' building one server to test a new system. Beyond this, I'm alone, I don't like this.

Question: Oh haha. Are you building Gateway Server, VPN Server , Proxy Server and PPP connection?

Answer: You need to enable kernel option IPv4 forwarding support in sysctl.conf file, To enable IPv4 on your Linux system, use the following command:

Step 1: Edit the sysctl.conf file and add the following line:
[root@centos01 ~]# vi /etc/sysctl.conf

And add the following line:

# Controls IP packet forwarding (required only for Gateway, VPN, Proxy, PPP)
net.ipv4.ip_forward = 0

Step 2: You must restart network for the change to take effect as show below:

[root@centos01 ~]#/etc/init.d/network restart

You also have another way to update the entry without restarting the network by using the following command:

[root@centos01 ~]#sysctl -w net.ipv4.ip forward=1

Answer: Oh you are right. Look at here, it's running. Thank you

Question: You're welcome.





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


Sau buổi nhậu,

Có đôi lúc, sự trống trải đến rõ ràng. Nhường chỗ cho một loạt những thay thế thường ngày. Nói thẳng nói ra, là cảm thấy trống vắng.

Có lẽ, mất thời gian, mất cả người ngoài cuộc, để nhận ra rằng, cái giá trị nhìn thấy của những lần rong chơi, đằng sau nó: là sự bền bỉ, độ lỳ, trách nhiệm và tinh thần theo đến cùng cái mình muốn, tham vọng. Người khác làm được mình cũng làm được. Đôi khi cần đơn giản như thế, để dám từ bỏ.

Nói thật, về sức khỏe thì có sự chênh lệch vừa phải cho đến rõ ràng luôn giữa một đoàn người. Nhưng độ bền, độ lỳ thì không thể đo, không thể nhìn thấy. Trừ - những người thực sự tinh tế và sâu sắc.

Đôi lúc thế tí, vì thực ra bình thường cũng thế.

Ngày hôm nay, đọc & mỉm cười với một câu - mà lâu nay vẫn tự nhắc nhở: học tiếng mẹ đẻ cho thật tốt, kể cả biết viết văn, nhưng không sa vào những thứ điên rồ.

# Nói gì thì nói, nhạc RocK tự bản thân nó đã là một nhân cách. Lấy nó ra để dẫn chứng.

Nghe Forever:

http://www.youtube.com/watch?v=jKeqWLHl0Rk

Ngày khác ...

Ngày khác,

Thật nhạt thếch nếu mọi thứ đều bình quân và ai cũng giống ai.

Ai giống ai? Chả có ai giống ai!

Sự khác biệt đôi khi chỉ là những điều nhỏ nhỏ, mỗi người đều có nó tự nhiên chứ không nhất thiết phải cố tình gượng ép mà tạo thành.

Chỉ là vậy thôi,

Chiều muộn chào ngày khác,

Hết một ngày làm việc mà đếch làm thêm được bao nhiêu,
Những dòng việc trên trang giấy nhỏ vẫn còn đó chưa gạch ngang,

Thành Phố Hồ Chí Minh, chiều muộn 04 tháng 12 năm 2013,

Phan Thế Tiến

*** đoạn trên có sử dụng một số từ, đoạn văn, lời nói của anh Trần Lập ở Album Ngày Khác và ở buổi họp báo Dấu Ấn show. Tất nhiên, có cả lời của tôi. Chỉ là vậy thôi.

[HOW TO] mount an ISO file on Ubuntu/ Linux Mint

How to mount an ISO file?

I'm using Ubutu. Now I need to mount ISO file.
This command will be mounted:

~$:sudo mount -o loop /home/file.iso /mnt/isomount/

It's simple. Can you tell me if you have a new way?
Thank you,

I'm hungry :D

12:10 PM




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

Đừng nóng như hổ, đừng hoang dại như sói. Hãy là tổng hợp...

Đã một năm tám ngày,


Cách đây khoảng thời gian trên, tôi đã nói: chào thành phố Hồ Chí Minh, tôi đã đến đây.

Cái tôi của một người đàn ông 25 tuổi với khao khát thay đổi, thể hiện và khẳng định mình. Có cả cái ngạo nghễ. Cũng may, đã có sự điềm tĩnh trong suy nghĩ. Để không trở thành một thằng thanh niên điên rồ với những chất chứa và hành động kiểu bộc phát. May thật? may hay không may?

Tuổi trẻ rồi cũng sẽ qua, 
cuộc chơi cũng đến lúc dừng, 
chuyến đi cũng đến lúc kết thúc,
đoàn tàu Bắc Nam miệt mài chạy, cũng đến lúc dừng,

Tất cả là thế, là qui luật của cuộc chơi, người chơi là người kết thúc; đôi khi người chơi cóc có quyền kết thúc một thứ điên rồ tự dưng xuất hiện kết thúc cả người chơi.

Thế nhưng, tôi muốn nắm cuộc sống của tôi, số phận của tôi. Tôi không tin vào số phần, chỉ tin vào những kẻ lười biếng sẽ không có gì làm tích cực, cuộc sống sẽ đối đãi tốt - không về vật chất, thì cũng là tinh thần, tình cảm - với những con người biết trọng, biết nhân, biết tâm, biết học cách sống "tử tế" hàng ngày giữa bao bộn về.

Viết đôi dòng trên, nghe những bản nhạc rock ballads, ngẫm thấy vui. Sau bao lâu, từ thời blog 360 tới giờ mới tìm được một nơi để ghi lại đôi dòng, chia sẻ những kiến thức, suy nghĩ nhỏ nhoi của tôi.

Nó là niềm vui nhỏ, để mình thấy, dù nhỏ nhưng cũng tạo ra được chút giá trị cho cộng đồng. Cộng đồng - lớn lao quá - nhưng là thứ tôi luôn hướng đến. Nó cũng nằm trong cụm từ "học làm người tử tế". 

Của thiên trả địa, tất cả đừng giữ chặt cho mình, chia sẻ nó cho mọi người - những người mình thấy họ xứng đáng được nhận; những người mình thấy họ dù đứng ở địa vị nào, dù xuất phát điểm thế nào, dù chẳng có gì như một ông lão, một bà cụ, một em nhỏ lang thang trên đường nắng đi "ăn xin" để sống qua ngày. Thứ tôi quan tâm nhất, là họ, trong ánh mắt của họ: thể hiện cái tâm.

Giữa dòng đời vồn vã, đua tranh. Cái tâm đã có nhiều biến thể, đa nhân cách. Nhưng tựu trung lại, may mắn, vẫn đủ để nhận ra, đâu là: quân tử, ngụy quân tử, tiểu nhân, đa nhân cách, ma tà. Cuộc đời nuôi ta lớn, con người xã hội dạy ta trưởng thành, tát vào mặt tôi, ném gạch vào đầu tôi, chăm bón cho tôi lớn.

Tôi không quên và luôn ghi nhận. Từng ngày, từng ngày cố gắng. Người có phúc phần. Nhưng những người muốn hại ta, đâm sau lưng tôi, những kẻ tiêu nhân ham lợi trước mắt sẽ bị vả xứng đáng.

Dặn mình cần điềm tĩnh, đừng nóng như hổ, đừng hoang dại như sói. Hãy là tổng hợp. 

"Học làm người đàn ông có trách nhiệm"

"Học làm người tử tế"

"Học làm người đàn ông thành đạt"

"Học vì họ làm được mình cũng làm được"

"Học để khẳng định mình"

Học từng ngày để sống tốt hơn, để có một cộng đồng tích cực, những người anh em - dù ít - nhưng chân thành, sống với nhau bằng cái tâm.

[ Trọng nghĩa khí và những người anh em ]

[ Đi khắp vùng miền, ngắm bình minh và hoàng hôn ở nhiều nơi, để rồi vẫn cứ nhận ra điều giản dị nhất: không đâu bằng gia đình, ở nhà mình :) ]

[ Lý Tiểu Long, trích dẫn: theo thời gian, anh hùng cũng giống như người bình thường vậy, sẽ chết đi, biến mất khỏi ký ức của người khác. Khi chúng ta đang sống, hãy biết tự nhận ra bản thân và thể hiện bản thân ]

Ghi chút cho đầu ngày 03 tháng 12 năm 2012,
những ngày cuối năm,
12:12AM

Phan Thế Tiến


[HOW TO] install/ use/ change password x11vnc

Hi everybody,

We are trying to improve everyday. The life is more interesting.

Today, I bring a little article to you that how to install/ change password x11vnc.

Firstly, What is x11vnc?

x11vnc allows one to view remotely and interact with read X display with any VNC viewer. It has built-in SSL/TLS encryption and 2048 bit RSA authentication, including VeNCrypt support; UNIX account and password login support, server-side scaling, single port HTTPS/HTTP + VNC, Zeroconf service advertising.

It also provides an encrypted Terminal Services mode (-create, -svc, or -xdmsvc options) based on Unix usernames and Unix passwords whrere the user does not need to memorize his VNC display/port number. Normally a virtual X session (Xvfb) is created for each user, but is also works with X sessions on physical hardware. 

x11vnc needs only standard libraries C++ and so should work on nearly all Unix destroy, even very old ones.

The VNC protocol is in most cases better suited for remote connactions with low bandwidth and high latency than is the X11 protocol because it involves far fewer "roundtrips", with no state mantained the viewing-end can crash, be rebooted, or relocated and the applications and desktop contine running. Not so with X11.

#####

You can install x11vnc from repositories as command below:

tienphan@November-ain:~$ apt-get install x11vnc

To change password:

tienphan@November-ain:~$ x11vnc -storepasswd "password here" /etc/x11vnc.pass

To enable x11vnc session:

tienphan@November-ain:~$ x11vnc -auth guess

I think when we really research about it, all of information above is a small. This article as how to guide and I come back to provide more information.

Thank you,




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 Google Talk (Google Talk Plugin) in Ubuntu

I have an account Google Talk. Now I want to use it at My Company.

My Company blocks Google Talk and other instant messages. They only allow locally instant messages. But I don't want, I want to use Google Talk to contact, chat with my friends, talk them about work, technical, knowledge, life.

I don't life in a box.

I'm googling about Google Talk on Ubuntu installation.

Here a result,

To get started, press Ctrl - Alt - T (or right click, choose: terminal) on your keyboard to open Terminal. When it opens, run the command to add Google Apps repository key as below:

root@November-ain:/etc/apt/sources.list.d# wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

To create a repository file:
root@November-ain:/etc/apt/sources.list.d# cd /etc/apt/sources.list.d/
root@November-ain:/etc/apt/sources.list.d# vi google_list.list

Then copy and paste the line into the file google_list.list and save it
deb http://dl.google.com/linux/talkplugin/deb/ stable main

Finally, run the command to update your system
root@November-ain:/etc/apt/sources.list.d# apt-get update

And
root@November-ain:/etc/apt/sources.list.d# apt-get install google-talkplugin

That's it,




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 Lightning add-on on Mozilla Thunderbird

Hello Friends,


Everything is good till now 19:02 PM. I just receive a mail about: volunteer in Rock Night of Buc Tuong Band. One Rock band I like a lot.

Now I want to share with everybody about Mozilla Add-on. I think you will flexible with it.

Let's go,

You are using Mozilla Thunderbird to send/receive everyday. And you have a appointment/meeting. What is important?

Time! Yes, is it.

Time will be show clearly your face. You install Lightning add-on to resolve.

Here we have two way installation:

1. One way:
You come to home page: https://addons.mozilla.org/en-US/thunderbird/addon/lightning/ , choice Download for Linux and Windows appears, wait a few second, click Install button.

2. Second way:
You download add-on file format to local. In the Mozilla Thunderbird, Tool/ Add-on/ Install Add-on from file ...

That's end.

Notice: 
You need to download version compatible with your Mozilla Thunderbird. View here https://addons.mozilla.org/en-US/thunderbird/addon/lightning/versions/




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

[WHAT] What is .RHOSTS?

Now I'm reading a book about securing Linux.

On question for .rhosts, What is .RHOSTS?

Transient, it seem to be simple. But it's not simple, it's very important. Hackers/Victim could use it to attack our system.

Because I will explain about it in this article:

On (*)NIX, the "rhosts" mechanism allows one system to trust another system. This means that if a user logs onto one (*)NIX system, they can further log onto any other system that truts it.

Only certain programs will use this file:

rsh: tells the system to open a remote "shell" and run the specifiled program.
rlogin: creates an interactive Telnet session on the other computer.

Keypoint: 

1. A common backdoor is to plcae the entry "++" in the rhosts file. This tells the system to trust everybody.

2. The file simply contains a list of named hosts or IP addreses. Sometime the hacker can forge DNS information in order to convince the victim that he has the same as a trusted system. Alternately, a hacker can sometimes spoof the IP address of a trusted system.


You should not have any .rhosts files on your systems. If the result returns nothong, then you are safe  and your system contain no .rhosts file in the /home directory at this time.

You can locate all existing .rhosts file on your system with the following command:
[root@r0039 /]#find /home -name .rhosts


Additaonally, you can also use a cron job to periodically check for, report the contents of, and delete $HOME/.rhosts files. Also, users sould be made aware that you regularly perform this type of audit, as directed by your security policy.

Create the rhosts.cron file (/etc/cron.daily/rhosts.cron) and add the following lines inside the script file.

#!/bin/bash
/usr/bin/find /home -name .rhosts | (cat <<<EOF) | /bin/mail -s "Hello babe, content of .rhost file audit report" root


Now make this script executable, verify the owner, change the group to "root"

[root@r0039 /]#chmod 550 /etc/cron.daily/rhost.cron
[root@r0039 /]#chown 0.0 /etc/cron.daily/rhost.cron

Each day mail will be sent to "root" with a subject: "Hello babe, content of .rhost file audit report" containing potential new .rhosts file




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







[LIFE] Bài học: Dạy một con chó cách phát hiện ma túy

Bạn có thể có tài năng hoặc không. Công việc của tôi là tìm ra điều đó, thật nhanh .... Nếu người đó không có, tôi đã lãng phí thời gian của mình ... Cho dù bạn dạy một người cách chơi golf, hoặc dạy một con chó cách phát hiện ma túy thì điều đầu tiên bạn phải biết là: ĐỐI TƯỢNG ẤY CÓ NĂNG LỰC HAY KHÔNG?

HCMC, rạng sáng 22 tháng 11 năm 2013.

Còn một vài ngày cho đủ một năm và nhiều việc ở phía trước.

Gần thôi.

Không có gì là cho không biếu không. Không có may mắn tự nhiên đến.

Ghi nhớ và luôn tự hỏi để biết mày là ai? mày đang có gì? xuất phát điểm của mày thế nào? mày muốn gì? mày trở thành gì sau 5 tháng nữa?

Trả lời và hãy tự sỷ nhục bản thân khi cần. Chỉ có đi lên phía trước mới đạt được kỳ vọng.



Quan Vân Trường

[LIFE] Sống làng nhàng, lười tự học là nguyên nhân thất bại

Đọc để ghi nhớ sâu sắc - một ngày đọc lại sẽ thấy mình khác đi!

###

Trong môi trường các doanh nghiệp nói riêng và xã hội nói chung, như tôi quan sát, có nhiều bạn trẻ bằng lòng với công việc mình đang làm. Các bạn còn thờ ơ với sách vở, xem việc có tấm bằng đại học là đã đủ. Nhiều bạn chỉ thích lang thang trên mạng và như đang trôi vô định trong dòng đời.
Nhiều bạn đang chọn cuộc sống làng nhàng và không có nhu cầu tự học hay tự hoàn thiện bản thân. Và như là một sự tất yếu, may mắn chỉ mỉm cười với những người luôn nỗ lực vươn lên và chủ động tạo cơ hội cho mình.
Là lãnh đạo cao nhất của doanh nghiệp, tôi luôn mong muốn công ty mình trở thành một tổ chức học hỏi. Tôi thành lập thư viện, tặng sách hay cho nhân viên, tổ chức các buổi đào tạo, quan tâm đến hoạt động của Đoàn thanh niên, hỗ trợ chi phí học đại học cho nhân viên… Tôi mong muốn tạo điều kiện để các bạn trẻ trong công ty có cơ hội phát triển bản thân thông qua việc tự học.
Tuy nhiên, người lãnh đạo hay đàn anh đi trước chỉ có thể gợi mở, định hướng, tạo điều kiện chứ không thể bắt ép nhân viên đọc sách hay thúc ép tham gia các khóa học. Chưa kể dù có ngồi trong lớp học đi nữa mà người đó không thích hoặc không muốn ứng dụng điều mình học vào cuộc sống, biến kiến thức của thiên hạ thành tài sản của bản thân thì thời gian ngồi trong lớp học cũng thành vô ích!
Cho nên, chia sẻ với những bạn trẻ, tôi cho rằng điều đầu tiên cần phải xác định học hỏi là một nhu cầu của bản thân, để mỗi người có thể giỏi hơn, hoàn thiện mình hơn ngày hôm qua.
Một ngày trôi qua mà không tiếp thu, tích lũy được điều gì mới, có ích thì đó là một ngày lãng phí!
Việc tích cực học hỏi có thể chưa mang lại ngay vị trí tốt hơn trong công việc nhưng chắc chắn với tinh thần cầu tiến và thái độ sẵn sàng học hỏi, bạn trẻ đó sẽ làm tốt hơn công việc được giaogiúp ích được những người xung quanh. Hơn nữa, chính kiến thức được tích lũy và những thành công nho nhỏ trong công việc sẽ giúp chúng ta tự tin và vui sống.
Internet, sách vở hiện nay là nguồn kiến thức vô tận. Tôi biết rất nhiều người thành đạt, giàu có và lớn tuổi hơn tôi nhưng đang không ngừng học hỏi. Vừa rồi tôi có trò chuyện với cô Tôn Nữ Thị Ninh. Cô Ninh cho biết một trong những điều tiếc nuối nhất trong cuộc đời cô là có một giai đoạn vì quá bận rộn nên cô không có thời gian đọc sách.
Các bạn nhân viên từng vào phòng làm việc của tôi và thấy tôi đọc sách. Và mỗi lần bước chân vào cửa hàng sách, tôi luôn choáng ngợp kèm theo nỗi lo lắng. Có quá nhiều sách mới, kiến thức mới mà mình cần phải biết. Tác dụng và ý nghĩa của việc đọc sách chắc không cần phải nhắc lại. Tôi rất tâm đắc với câu nói của Thomas Carlyle: “Chúng ta sẽ trở thành gì phụ thuộc vào điều chúng ta đọc sau khi tất cả thầy cô giáo đã xong việc với chúng ta. Trường học vĩ đại nhất chính là sách vở”.
Cần có huấn luyện viên
Cũng hãy xem ví dụ về các vận động viên tennis nhà nghề. Đa số họ đều có huấn luyện viên và nếu vận động viên phải thi đấu với huấn luyện viên, có lẽ đa số vận động viên sẽ chiến thắng. Thế nhưng, tại sao họ vẫn cần huấn luyện viên. Vì huấn luyện viên là người có thể nhìn ra những điểm mà vận động viên chưa hoàn thiện và giúp họ rèn luyện để cải tiến.
Trong đời thực cũng vậy. Ngoài những người thầy trên lớp, bạn vẫn nên tìm kiếm để có được những người thầy ngoài giảng đường, giúp định hướng và chỉ ra được những điểm chưa tốt để mình hoàn thiện. Bạn có thể học hỏi và ghi nhận những lời chỉ dẫn từ lãnh đạo phòng, các bạn đồng nghiệp, người thân trong gia đình.
Cuối cùng, việc tự học còn đến từ sự dấn thân và trải nghiệm. Chính thực tế khắc nghiệt sẽ là người thầy khó tính nhưng giàu kinh nghiệm. Chỉ có hành động mới mang lại kết quả và thất bại sẽ giúp bạn trưởng thành.
Để can đảm dấn thân, bạn cần một thái độ sống tích cực và sẵn sàng học hỏi. Thomas Edison đã không lùi bước sau 999 lần thất bại trước khi phát minh thành công bóng đèn điện. Có thể các công việc khi bắt đầu chỉ là những công việc giản đơn, buồn tẻ. Nhưng nếu bạn hoàn thành một cách xuất sắc, bạn sẽ được công nhận. Tôi định nghĩa sự chuyên nghiệp chính là việc hoàn thành công việc được giao vượt trên sự mong đợi. Bạn hãy trở thành một người làm việc chuyên nghiệp như giá trị cối lõi của công ty đã đề ra.
Luôn luôn có cơ hội thành công và làm giàu cho những bạn không ngừng học hỏi và nỗ lực vươn lên. Cuộc sống vốn công bằng. Bạn sẽ nhận được những gì mình nỗ lực và cho đi. Hãy đừng bằng lòng với một cuộc sống buồn tẻ, làng nhàng mà hãy cố gắng đọc sách, học tập trong và ngoài giảng đường, dấn thân, trải nghiệm để sống một cuộc đời có ích.
Học tập là sự nghiệp của cả một đời người!

NGUYỄN TUẤN QUỲNH

Tổng Giám đốc Công ty CP Nhiên liệu Sài Gòn - SFC