[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