[HOW TO] Install Kingsoft Office in Ubuntu 13.04/12.10/12.04 and Mint 15/14/13

To Install Kingsoft Office in Ubuntu 13.04/12.10/12.04 and Mint 15/14/13, Open a terminal and enter the following:

For Ubuntu - Mint 32bit :
wget -O kingsoft-office-Ubuntukiller_32.deb http://goo.gl/Zw0VG
sudo dpkg -i kingsoft-office-Ubuntukiller_32.deb
rm -rf kingsoft-office-Ubuntukiller_32.deb

For Ubuntu - Mint 64bit :
sudo apt-get install ia32-libs
cd && wget -O kingsoft-office-Ubuntukiller_64.deb http://goo.gl/Zw0VG
sudo dpkg -i kingsoft-office-Ubuntukiller_64.deb
rm -rf kingsoft-office-Ubuntukiller_64.deb

[HOW TO] Unable to access File/SMB Shares | Server 2008R2


Running Windows Server 2008 R2 (DC) and am unable to access any other servers SMB/File shares. Clients can access the shares on this server without any issues.

When you access \\servername is simply displays and error:

"Windows Cannot Access \\servername" 0x80070043 The network cannot be found.


You must follow this guide to do:
Local Security Policy\ Security Settings\ Local Policies\ Security Options\ Network security: LAN Manager authentication level

+++

Network security: LAN Manager authentication level

This security setting determines which challenge/response authentication protocol is used for network logons. This choice affects the level of authentication protocol used by clients, the level of session security negotiated, and the level of authentication accepted by servers as follows:

Send LM & NTLM responses: Clients use LM and NTLM authentication and never use NTLMv2 session security; domain controllers accept LM, NTLM, and NTLMv2 authentication.

Send LM & NTLM - use NTLMv2 session security if negotiated: Clients use LM and NTLM authentication and use NTLMv2 session security if the server supports it; domain controllers accept LM, NTLM, and NTLMv2 authentication.

Send NTLM response only: Clients use NTLM authentication only and use NTLMv2 session security if the server supports it; domain controllers accept LM, NTLM, and NTLMv2 authentication.

Send NTLMv2 response only: Clients use NTLMv2 authentication only and use NTLMv2 session security if the server supports it; domain controllers accept LM, NTLM, and NTLMv2 authentication.

Send NTLMv2 response only\refuse LM: Clients use NTLMv2 authentication only and use NTLMv2 session security if the server supports it; domain controllers refuse LM (accept only NTLM and NTLMv2 authentication).

Send NTLMv2 response only\refuse LM & NTLM: Clients use NTLMv2 authentication only and use NTLMv2 session security if the server supports it; domain controllers refuse LM and NTLM (accept only NTLMv2 authentication).

Important

This setting can affect the ability of computers running Windows 2000 Server, Windows 2000 Professional, Windows XP Professional, and the Windows Server 2003 family to communicate with computers running Windows NT 4.0 and earlier over the network. For example, at the time of this writing, computers running Windows NT 4.0 SP4 and earlier did not support NTLMv2. Computers running Windows 95 and Windows 98 did not support NTLM.

Default:

Windows 2000 and windows XP: send LM & NTLM responses

Windows Server 2003: Send NTLM response only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: Send NTLMv2 response only

TiếnPT R0039

[HOW TO] Cài đặt Apache Tomcat

1. Apache Tomcat là gì?
Application server miễn phí được phát triển bởi Apache Software Founation, Tomcat giúp thực thi các ứng dụng viết bằng Java Servlet và JSP (Java Server Packs).

2. Hướng dẫn cài đặt:
a. Yêu cầu:

  • Cài đặt JRE (Java Runtime Enviroment) trước đó.
  • Kiểm tra JRE đã cài đặt chưa bằng dòng lệnh: >java -version

b. Cài đặt

  • Cài đặt JRE
  • Cài đặt TomCat, recommend: Windows Services Installer. Quá trình cài đặt tuần từ NEXT & NEXT, các lựa chọn nên để DEFAULT (bạn sẽ thay đổi cấu hình theo nhu cầu sau - nếu cần).
  • Cài đặt hoàn thành, truy cập: http://localhost:8080


TiếnPT - R0039




[HOW TO] explain the /etc/fstab?



1. FSTAB là gì? tại sao cần?

  • Là một tập tin cấu hình chứa các thông tin về phân vùng trên ổ cứng/ thiết bị lưu trữ khác trong máy tính. Nó chứa các thông tin cần thiết để xác định ổ cứng/ thiết bị lưu trữ của bạn được lưu ở đâu? như thế nào? trong cấu trúc thư mục.
  • Để điều chỉnh fstab, bạn cần có quyền root & dùng text editor (nano, vi ...)

2. Mô tả sơ lược về fstab:

—-1———-2———–3—————-4—————5—————–6—-
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=swap swap swap defaults 0 0
/dev/sda8 /working vfat auto,user,exec,rw 0 0
/dev/sda9 /eLib ntfs-3g auto,user,noexec 0 0


a. Ý nghĩa cột 1 và 2?
  • Thiết bị cần mount
  • Nơi mặc định để mount: là ổ đĩa/ thiết bị cần mount.
  • Thông số về file sys và các thông số phụ: #mount /dev/sda9 -t ntfs /mnt/ nếu muốn chỉ định file system


3. Loại systems?
Định dạng file hệ thống.

  • ext2 và ext3: dùng cho các hệ thống Linux
  • reiserfs: nếu ổ đĩa bạn định dạng kiểu ReiserFS
  • swap: swap partition
  • vfat, ntfs, ntfs-3g: vfat được dùng cho FAT32 (Windows), ntfs cho NTFS (chú ý một số distro như RedHat không đưa hỗ trợ ntfs vào mặc định do đó bạn cần compile lại kernel hoặc cài thêm module ntfs vào). ntfs-3g là một giải pháp cho việc read-write ntfs partition trên Linux tương đối tốt hiện nay.
  • auto: tự động detect, nếu không biết partition của mình định dạng kiểu gì thì hãy thử tuỳ chọn này.


4. Các tuỳ chọn mount
Nó quy định xem có mount tự động lúc khởi động không? user có quyền mount không? có cho phép thực thi các file trên đó không? (nhiều trường hợp lỗi khi thực thi các script, exec file không được là do phần tuỳ chọn này).

  • auto và noauto: auto, thiết bị sẽ tự động mount lúc khởi động máy tính, đây là tuỳ chọn mặc định. Nếu bạn không muốn thiết bị của mình được mount tự động, dùng tuỳ chọn noauto, lúc này khi nào bạn ra lệnh mount thì hệ thống mới mount cho bạn.
  • user và nouser: tuỳ chọn user cho phép những user thường có thể mount thiết bị, nouser chỉ cho phép root mới có quyền mount. Tuỳ chọn nouser là mặc định, nếu bạn không thể mount CD, ổ đĩa từ windows… bạn hãy điều chỉnh lại thông số này.
  • exec và noexec: exec cho phép thực thi các file thực thi tồn tại trên partition đó, đây là tuỳ chọn mặc định. Noexec không cho phép thực thi những file này, tuỳ chọn này thường được áp dụng đối với những phân vùng không có file thực thi hoặc không muốn cho thực thi.
  • ro: mount partition ở chế độ read-only. Với chế độ này bạn chỉ có thể đọc mà không thể ghi được vào partition đó.
  • rw: Mount partition ở chế độ read-write, đôi khi bạn phải đau đầu vì tuỳ chọn này do không thể ghi vào đĩa mềm mà không hiểu nguyên nhân vì sao.
  • sync và async: đây là tuỳ chọn cho việc đọc và ghi lên file system. sync nghĩa là tất cả được làm đồng thời với nhau, tuỳ chọn này thường được áp dụng cho đĩa mềm. Một vd: khi bạn ra lệnh copy một file lên đĩa mềm, với tuỳ chọn sync file sẽ được chép ngay lập tức khi bạn ra lệnh, với tuỳ chọn async (không đồng thời) thì file đó chưa hẳn đã được chép lên đĩa. Nếu như bạn rút đĩa ra mà không umount thì có thể file đó không tồn tại trên đĩa mềm. async là tuỳ chọn mặc định.
  • defaults: sử dụng các tuỳ chọn mặc định đó là rw, suid, dev, exec, auto, nouser, and async
  • Các tuỳ chọn được cách nhau bằng dấu phẩy (,)


5 & 6. Các tuỳ chọn cho lệnh dump và fsck

  • Dump là gì? Đó là một tiện ích backup filesystem, gõ lệnh $man dump để biết thêm thông tin
  • Còn fsck? tiện ích kiểm tra file system có bị hư hỏng gì không (và sửa lỗi nếu được).
  • Cột thứ 5: thông số tuỳ chọn cho dump. Dump sẽ dựa vào con số bạn cấu hình để biết phải làm gì, nếu nó là 0 thì dump sẽ bỏ qua và không làm gì, hầu hết các trường hợp thông số này đều bằng 0!
  • Cột thứ 6: thông số tuỳ chọn cho lệnh fsck. Nó quy định thứ tự để kiểm tra file system, nếu thông số này bằng 0 đồng nghĩa với việc fsck sẽ không kiểm tra

TiếnPT - R0039

[HOW TO] Install Wireshark on Linux Mint.

I just install Wireshark and this article will explain how to install Wireshark on Linux Mint.
Finally, you need install Wireshark from repo via command:

~ # aptitude install wiresharks
~ # addgroup wireshark
~ # usermod -a -G wireshark tienphan
~ # chgrp wireshark /usr/bin/dumpcap
~ # chmod 750 /usr/bin/dumpcap
~ # setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
~ # getcap /usr/bin/dumpcap

At this point you will need to logout, then back to run Wireshark to relax.
You should now be able to run Wireshark as a noon-root user, just as long as that user is a part on the wireshark group, everything should just work.


TiếnPT - R0039

[HOW TO] remove "Administrative Tools" on Start Menu on Windows Server Vista later using Group Policy.

In your GPO using Group Policy Management Editor:
1. User Configuration
2. Control Panel Settings
3. Start Menu: here define a New Start Menu for Windows Vista and later, System Administrative Tools, Don't display this item.

Mersk's Project 15th Jun 2013

[HOW TO] Microsoft DOS shutdown command

Microsoft DOS shutdown command

Quick links
About shutdown
Enables a user to shutdown a Windows XP computer from the command line as well as perform additional features that are not available through Windows.
Availability
The shutdown.exe command is an external command available in the below Microsoft Windows operating systems.
Syntax
Windows 7 and 8 Syntax
Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f] [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
No argsDisplay this message (same as -?)
/iDisplay the graphical user interface (GUI).
This must be the first option.
/lLog off. This cannot be used with /m or /d options.
/sShutdown the computer.
/rShutdown and restart the computer.
/gShutdown and restart the computer. After the system is rebooted, restart any registered applications.
/aAbort a system shutdown. This can only be used during the time-out period.
/pTurn off the local computer with no time-out or warning. Can be used with /d and /f options.
/hHibernate the local computer. Can be used with the /f option.
/eDocument the reason for an unexpected shutdown of a computer.
/m \\computer\\computer Specify the target computer.
/t xxxSet the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied.
/c "comment"Comment on the reason for the restart or shutdown. Maximum of 512 characters allowed.
/fForce running applications to close without forewarning users. The /f parameter is implied when a value greater than 0 is specified for the /t parameter.
/d [u] [p]:xx:yyProvide the reason for the restart or shutdown.
p indicates that the restart or shutdown is planned.
u indicates that the reason is user defined.
If neither p nor u is specified the restart or shutdown is
unplanned.
xx is the major reason number (positive integer less than 256).
yy is the minor reason number (positive integer less than 65536).
Windows XP Syntax
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]
No argsDisplay this message (same as -?)
-iDisplay GUI interface, must be the first option
-lLog off (cannot be used with -m option)
-sShutdown the computer
-rShutdown and restart the computer
-aAbort a system shutdown
-m \\computernameRemote computer to shutdown/restart/abort
-t xxSet timeout for shutdown to xx seconds
-c "comment"Shutdown comment (maximum of 127 characters)
-fForces running applications to close without warning
-d [u] [p]:xx:yyThe reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)
Examples
Note: As may or may not be apparent by reviewing the above syntax the earlier version of the shutdown command uses a dash (-) instead of forward slash (/) for the options.
shutdown -r -c "Rebooting for latest updates."
This would display a Windows System Shutdown window for 30 seconds, warning the user that the computer is going to shutdown and then restart the computer.
shutdown -i
Ran from either the command line or from the Windows run line this option would open the remote shutdown dialog Window. Additional information on remotely shutting down another Windows computer.
shutdown /h
Place the computer in hibernation mode in Windows Vista, 7, or 8.

[HOW TO] Solving “The website has encountered a problem and cannot display the page you are trying to view. The options provided below might help you solve the problem” Windows Update error



Today at work I had to restore over 50 computers from disk image (made with Norton/Symantec Ghost). All computers but one restored successfully. One computer had a bit different hardware so we need to update drivers for it manually. First place I look for device drivers is Windows Updates therefore I’ve tried to run it (BTW, the computer I’m talking about was running Windows XP SP3). The problem was that when I had pressed either “Custom” or “Express”, Windows Update page showed me the following error with the error code 0xC80003FA:


The website has encountered a problem and cannot display the page you are trying to view. The options provided below might help you solve the problem.

Just to be sure the problem is computer specific and not comes from network or image, I’ve tried to run Windows Update on couple other computers restored from the same image. Everything was working fine here, so I was sure the problem is with this specific computer.

After searching for a while I’ve found out that the problem in most cases might happen because of corrupted Windows Update files and reinstalling Windows Update Agent should solve the problem. So that’s what I’ve done:

I’ve downloaded newest version of Windows Update Agent for Windows XP (32-bit): http://download.windowsupdate.com/WindowsUpdate/redist/standalone/7.4.7600.226/WindowsUpdateAgent30-x86.exe

I’ve stopped Windows Automatic Update Service (net stop wuauserv)

I’ve stopped Background Intelligent Transfer Service (net stop bits)

I’ve ran Windows Update Agent setup: WindowsUpdateAgent30-x86.exe /wuforce /norestart

Ran net start wuauserv just to be sure Windows Automatic Update Service is started (actually it was started already by Windows Update Agent setup)

I’ve started Background Intelligent Transfer Service (net start bits)

After doing all steps above I’ve tried to run Windows Update and this time it worked correctly. Though the problem was solved I still think that this computer might have problems in the future with it’s HDD since Windows Update corruption after clean image restore is very likely to happen because of HDD problems.


Source: http://blog.dabasinskas.net/solving-the-website-has-encountered-a-problem-and-cannot-display-the-page-you-are-trying-to-view-the-options-provided-below-might-help-you-solve-the-problem-windows-update-error/

TienPT - R0039

[HELP & TIPS] Rsync, It's GRRRRaphical!

Rsync, It's GRRRRaphical!

Every year for our Readers' Choice survey, the venerable tool rsync gets votes for favorite backup tool. That never surprises us, because every time I need to copy a group of files and folders, rsync is the tool I use by default. It really has everything—local folder support, SSH tunneling support, delta-only synchronization, speed, versatility, and quite frankly, it's just a great program. It has everything—except a GUI.

Don't get me wrong; rsync works great without a GUI. I use it on the command line almost daily. The problem with rsync's amazing power is a rather complex set of arguments. It's possible to learn those flags, but for the neophyte user, they can be overwhelming. That's where Grsync really shines.

Grsync does a great job of turning countless command-line options into a manageable collection of check boxes and text-entry areas. When you add the nifty "sessions" feature that remembers settings along with source and destinations, it turns into the perfect filesystem sync tool. If you've ever felt rsync was powerful but too complex to use on a regular basis, I highly recommend Grsync. For making such a powerful tool accessible to the unwashed masses, Grsync gets this month's Editors' Choice Award. Now go copy some files! 



TiếnPT R0039

[LIFE] The Secret Password Is...



If your password is as easy as 123, we need to talk.

The first password I ever remember using when I started in system administration was ".redruM" (no quotes). It was by far the craftiest, most-impossible-to-guess password ever conceived by a sentient being. Sadly, a mere 17 years later (wow, it's been a long time!) that password probably could be brute-force compromised in ten minutes—with a cell phone.

Since retinal scans still mainly are used in the movies to set the scene for gruesome eyeball-stealing, for the foreseeable future (pun intended), we're stuck with passwords. In this article, I want to take some time to discuss best practices and give some thoughts on cool software designed to help you keep your private affairs private. Before getting into the how-to section, let me openly discuss the how-not-to.


The Things You Shall Not Do

It's a bad idea to write your password on a sticky note and affix it to your monitor.

Yes, it sounds like a joke, but this happens every day—in almost every business. In fact, sometimes tech folks are guilty of this cardinal sin because they've changed passwords for users and need to let them know their new passwords. Seeing your password written or typed out should cause you physical pain and distress. Displaying it on your monitor is just wrong.

It's a bad idea to use any of the following as your password, or at least as your entire password:


Your pet's name, current or past.


Your child's name or nickname.


Your car's name, model or a car you want.


Birth dates of any people you know.


Name of your college/high-school mascot.


Anything related to your hobbies.


Your address in any form.


Your telephone number, past or present.


Your mother's maiden name (this is less secure than .redruM).


Any of the following: password, 123456, abc123, letmein, love, iloveyou, sex, god, trustno1, master, asdfjkl;, qwerty, password123, secret, jesus or ninja.

If I've just described your password or, heaven forbid, actually listed it in the last bullet point (some of the most common passwords), you need to keep reading. Don't change your password yet though, as I'm going to discuss best practices next, but even if you don't read another word, you can't leave your password like it is—really.


The Things You Shall Try to Do

When it comes to passwords, the longer and more complex, the better. Unfortunately, there is an inverse relationship between the quality of a password and a person's ability to remember it. Logically, one would find the balance between easy to remember and sufficiently complex, but because some people forget how to spell their own names, using some tricks of the trade is necessary—preferably, combining the tricks.


The Sentence-Mnemonic Method

if I were to tell you my password is "sipmnwnoilbinetb" and that I can remember it every time, you'd probably be impressed. Watch, I'll type it again without looking back: sipmnwnoilbinetb.

Am I really a cyborg with an eidetic memory? Maybe, but in this case, I've just used the sentence-mnemonic method to remember my password. In reality, when I type that password, I'm saying in my head, "Sometimes I pick my nose when no one is looking, but I never eat the boogers."

This particular mnemonic is good for a couple reasons. One, it's easy to remember. Two, it's ahorrible lie, so no one would ever guess that's what I'm typing. And three, because it's embarrassing, it's unlikely that I'd say it out loud while typing. For most people, just using this method for passwords would be an improvement over their current practice. For the best security, however, it's important to add other complexity.
Substitutionary Complexication

Anyone who was a geek in the 1990s knows that all the cool kids would use numbers in their user names. Whether it was l33th@ck3r or z3r0c00l (or shawnp0wers), substituting numbers and characters for letters does add a layer of complexity. It's certainly not enough on its own—don't think the crafty use of an @ symbol or a few "3"s for "e"s will keep you safe—but if you add that to the mnemonic method, it certainly will help. "sIpmnwn1il,bInetb" looks similar to the eye to my password above, but it is much more resistant to a brute-force attack.


Compound Words

In addition to the above-mentioned methods for increasing complexity, a great way to make your password even more secure basically is to have two passwords separated by a string of numbers or characters. Continuing with our booger-picking example above, what if instead of using a comma to separate the phrases, I used a short string of numbers? On its own, something like 6229 is horribly insecure, but if you do something like "sIpmnwn1il6229bInetb", it becomes a really impressive password that is simple to remember. Because I'm talking about the middle of a character string, using an easy-to-remember number is acceptable here.

Based on just a few tricks, I've managed to come up with an excellent password that is easy to remember and not terribly difficult to type. Yay! I'm done! Well, yes and no.


Hey, That's My Luggage Combination!

The problem is that most people log in to more than one computer system or Web site. Some Web site designers have started to adopt an OpenID sort of authentication system, which allows authentication without actually using a separate password, but that isn't the case everywhere. At least in the near future, we'll be stuck with logins and passwords for multiple Web sites. In a perfect world where Web sites store only well-encrypted passwords, and bad guys never steal password databases, a single well-made password would suffice. That is not the world we live in.

It seems every day there's a company whose Web site has been compromised, and passwords have been leaked. Granted, it's often fun to see what sorts of passwords other people use, but it's a sinking feeling to find your password on the list of compromised—especially if it's the same password you use everywhere. The problem is, coming up with a new password for every Web site is difficult to manage.

If you're consistent and sneaky enough, you might be able to have a "pattern" that only you know. For example:


wIvljdc_Iapmn = when I visit Linux Journal dot com, I always pick my nose.


wIvadc_Iapmn = when I visit Apple dot com, I always pick my nose.


wIvwpdo_Iapmn = when I visit Wikipedia dot org, I always pick my nose.

Yes, looking at them side by side, it's easy to tell what the pattern is, but if only one is compromised, it's not terribly clear. Also, in the above examples, I used what letters made sense to me, but they don't line up with syllables, rather with how the word separation occurs in my head.


One Ring to Rule Them All

For many security-conscious readers, possibly even you, these lessons in good password practice may make you angry. For you, if a password isn't 128-characters long, with a combination of letters, symbols, numbers and fairy spells, it's not good enough. I understand—really, I do. Sadly, I also understand that most of the world still thinks "abc123" is a perfectly cromulent password. For you, my cyborg friend, there are password management tools.

When every site has a password like "af&6fw^faew^@f88*hlDSLjfe8wlsfyy&&8s0##~", it goes beyond simple mnemonics to remember. Thankfully, there are tools like KeePassX, which is an excellent password manager for Linux, discussed at length by Anthony Dean in the May 2010 issue (http://www.linuxjournal.com/content/keepassx-keeping-your-passwords-safe).

The idea behind programs like KeePassX, or the popular browser-based LastPass, is that you can keep your passwords as complex, and even as random, as you like. The programs keep your passwords encrypted and require a master password to unlock them. (When creating a master password, it's very important to follow some sort of complexity strategy, like I outlined earlier in this article.)

With a password manager, you can let your brain keep track of a single password, knowing you can retrieve whatever ultra-safe password you need for a site or computer at any time. Granted, this means relying on a program to keep track of your information, so you'll have to use the program to retrieve it, but with programs like LastPass, there are applications for pretty much every operating system, browser and smartphone in existence. It is usually the only practical way to keep truly random passwords in order. If you can train yourself to use a program or service to manage passwords, it can change the way you think of security. It also can keep you safe if a particular account is hacked. The system is only as secure as the master password, however, so be sure that's a good one!


Not Quite a Retina Scan...

Thankfully, some companies are taking an honest look at users and realizing password security isn't something they can force feed. Regardless of articles like this, people still will use the names of their dogs to secure their bank accounts. Some companies have begun to use two-step authentication, which adds a physical response to a password challenge.

Someone certainly can steal your password, but what if in order to log in to your e-mail account, you not only had to enter your password correctly, but also had to respond to a text message sent to your phone? It certainly would eliminate the long-distance hacks, because it's unlikely hackers even would know your cell-phone number, much less be able to respond to a text message sent to it.

Two-step, or two-factor, authentication isn't terribly popular yet, but the concept is powerful. If we can continue to come up with complex, yet convenient methods for proving authentication, we will make the world safer and safer. That doesn't mean we can become lax on how we create our passwords, however. Because at least for the near future, secure passwords are the only way to keep our data private.


So Class, What Did You Learn?

You all learned that Shawn apparently picks his nose—at every Web site he visits. Seriously though, hopefully this article has helped you figure out your own method for creating passwords. Please don't use my exact method, but rather use it to come up with your own. Until we can have retinal scanners on every laptop, we're going to have to secure our passwords the old-fashioned way, like barbarians. So remember, "Sdrphn,iwoae!" (Shawn doesn't really pick his nose, it was only an example.)


Source http://www.linuxjournal.com/content/secret-password?page=0,0
Apr 19, 2013  By Shawn Powers

[HOW TO] Snare agent for windows alert: "Invalid Change Token: Request denied" when configure network

Installed Snare Agent for Windows, when I set the Destination Snare Server address I get error "Invalid Change Token: Request denied". What am I missing?

The latest version of the Snare for Windows agent uses cookies as an additional security measure to prevent unauthorised changes. To disable the use of cookies by the agent, open regedit and set the value of
HKLM\SOFTWARE\InterSect Alliance\AuditService\Remote\EnableCookies to 0.

TiếnPT R0039

[HOW TO] install Webmin on Linux Mint 14

Hello Everybody,

This guide will show how to install webmin on Linux Mint 14.

The first, we need to download tar file: webmin-1.630.tar.gz from home page http://webmin.com
You need to extract webmin-1.630.tar.gz
PhanTheTien Downloads # tar -xvzf webmin-1.630.tar.gz
PhanTheTien Downloads # cd webmin-1.630/
PhanTheTien Downloads # cd webmin-1.630/
PhanTheTien webmin-1.630 # ./setup.sh
***********************************************************************
*            Welcome to the Webmin setup script, version 1.630        *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.

Installing Webmin in /home/tienphan/Downloads/webmin-1.630 ...

***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.

Config file directory [/etc/webmin]: 
Log file directory [/var/webmin]: 

***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.

Full path to perl (default /usr/bin/perl): 

Testing Perl ...
Perl seems to be installed ok

***********************************************************************
Operating system name:    Linux Mint
Operating system version: 14

***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
 - What port to run the web server on. There must not be another
   web server already using this port.
 - The login name required to access the web server.
 - The password required to access the web server.
 - If the webserver should use SSL (if your system supports it).
 - Whether to start webmin at boot time.

Web server port (default 10000): 
Login name (default admin): 
Login password: 
Password again: 
Use SSL (y/n): y
Start Webmin at boot time (y/n): y
***********************************************************************
Creating web server config files..
..done

Creating access control file..
..done

Inserting path to perl into scripts..
..done

Creating start and stop scripts..
..done

Copying config files..
..done

Configuring Webmin to start at boot time..
..done

Creating uninstall script /etc/webmin/uninstall.sh ..
..done

Changing ownership and permissions ..
..done

Running postinstall scripts ..
PID file /var/webmin/miniserv.pid does not exist
..done

Enabling background status collection ..
PID file /var/webmin/miniserv.pid does not exist
..done

Attempting to start Webmin mini web server..
Starting Webmin server in /home/tienphan/Downloads/webmin-1.630
Pre-loaded WebminCore
..done

***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to

  https://PhanTheTien:10000/

and login with the name and password you entered previously.

Because Webmin uses SSL for encryption only, the certificate
it uses is not signed by one of the recognized CAs such as
Verisign. When you first connect to the Webmin server, your
browser will ask you if you want to accept the certificate
presented, as it does not recognize the CA. Say yes.

PhanTheTien webmin-1.630 # 

After done, you can access: https://hostname:10000/ to manage Samba via Webmin

[HOW TO] install Groupwise client on Linux Mint 14

Hello everybody,

This guide will show how to install Groupwise Client on Linux Mint 14. Get good results with me.

Step 1:
You must download package novell-groupwise-client_8.0.2-96934_amd64.deb (link: http://www.mediafire.com/?i551p2fwp4hsx8b ).
#sudo dpkg -i novell-groupwise-client_8.0.2-96934_amd64.deb

Step 2:
You need to install enviroments for Groupwise:
#apt-get install alien ia32-libs libstdc++5 libgnome2-0 libasound2 libgcc1

Done!

TiếnPT R0039

[LIFE] Câu chuyện về người chăn cừu và bài học lãnh đạo




Những nhân tố lãnh đạo tuyệt vời dường như bất biến về mặt thời gian và không ngừng được mở rộng về mặt không gian. Từ thời thượng cổ, cả thế giới luôn khát khao tìm kiếm những nhà lãnh đạo lớn. Trong quãng thời gian chiến tranh và hỗn loạn, các nhà lãnh đạo lớn thường xuất hiện để vạch ra con đường dẫn đến hoà bình. Trong quãng thời gian của sự hoà bình và thịnh vượng, các nhà lãnh đạo lớn vẫn cần để duy trì hệ thống trật tự hay tìm ra các hướng đi phát triển mới.








Các nhà lãnh đạo lớn luôn nhận được sự ngưỡng mộ từ mọi người. Nhưng làm thế nào chúng ta phân biệt được những nhà lãnh đạo thực thụ từ vô khối những con người khác nhau?


Nguyên lý bắt nguồn từ thời cổ xưa và vẫn đứng vững qua những trải nghiệm thời gian. Các nhà lãnh đạo lớn luôn tiến thẳng về phía trước, xây dựng các hướng đi, đảm bảo trật tự và chỉnh sửa các khiếm khuyết hay quy định khi cần thiết. Không dừng lại ở đó, họ là những người giàu tình cảm với các nhân viên. Các nhà lãnh đạo lớn khao khát sống cuộc sống của họ để phục vụ những nhu cầu của mọi người.

Điểm đáng thú vị là khi quan tâm tới những nhà lãnh đạo đáng kính trên thế giới và trong lịch sử loài người, chúng ta có thể dễ dàng nhìn thấy một hình ảnh tương đồng giữa những người chăn cừu và nhà lãnh đạo tài ba.

Không quá khó khăn để miêu tả các tính cảnh của một nhà lãnh đạo theo hình ảnh người chăn cừu. Có rất nhiều điều chúng ta có thể học hỏi được từ sự so sánh này.

Bằng việc khảo sát những tính cách, đặc điểm và tầm nhìn theo phương thức người chăn cừu, chúng ta có thể chuyển tiếp tới một cấp độ năng lực lãnh đạo mới:

1. Người chăn cừu nhận ra đàn cừu không thể làm bất cứ điều gì anh ta muốn

Anh ta hiểu rằng đàn cừu không phải một công cụ, một phương tiện để anh ta tự ý xử lý mà là nguồn trách nhiệm mà anh ta cần quan tâm, chăm sóc. Anh ta được trao quyền, được tin tưởng bởi một người khác, và rõ ràng phải trả lời trước một người có thẩm quyền lớn hơn.

Là một nhà lãnh đạo hiệu quả, anh ta hiểu rõ không chỉ những gì cấu thành nên một nhà lãnh đạo mà cả những gì phải phục tùng và quan tâm tới nữa. Việc hiểu và chấp nhận chu trình này sẽ trau dồi và củng cố các tính cách của một nhà lãnh đạo tài năng.

2. Đàn cừu nghe thấy, nhận ra và đi theo giọng nói của người chăn cừu

Hết sức tự nhiên, mọi người có xu hướng đi theo những gì quen thuộc. Lòng tin sẽ phát triển mạnh theo những kinh nghiệm có được từ các mối quan hệ tốt đẹp. Chúng ta thường nghe thấy rằng sự thân mật rất dễ dẫn tới sự bất tuân lệnh, nhưng nó cũng dẫn tới lòng tin tưởng và với thời gian cùng sự kiên trì, nó sẽ đem đến các mong đợi.

3. Người chăn cừu biết rất rõ đàn cừu và anh ta có thể nhớ tên từng con cừu một

Người chăn cừu sử dụng một hệ thống âm thanh, gõ lách cách và huýt gió để gọi đàn cừu. Những âm thanh này là khác biệt cho từng con cừu trong đàn và mỗi con cừu nhận ra và phản hồi theo từng âm thanh riêng biệt với nó.

Trong lãnh đạo, những sự quan tâm chân thành và gần gũi luôn được mọi người nhận rõ. Đương nhiên nhà lãnh đạo sẽ đạt được các kết quả tuyệt vời. Mối quan hệ với các nhân viên chính là chìa khoá — không một người chăn cừu nào có thể làm việc tốt mà không ở bên cạnh những con cừu.

4. Người chăn cừu luôn dẫn dắt đàn cừu tới những nơi an toàn nhất và có nhiều lợi ích nhất, đồng thời tránh xa mọi nguy hiểm

Về chiến lược, người chăn cừu ra ngoài chuồng trước đàn cừu nhằm xác định và tránh xa các tai hoạ và rồi đưa đàn cừu tới chỗ an toàn. Trong bất cứ trường hợp nào, anh ta cũng giữ vai trò dẫn dắt. Anh ta không bao giờ mong đợi đàn cừu sẽ gặp phải những hoàn cảnh mà anh ta không sẵn sàng đương đầu.

Người lãnh đạo kinh doanh cũng vậy. Anh ta luôn dẫn dắt nhân viên tới những nơi an toàn và nhiều ích lợi nhất. Nhà lãnh đạo phải có khả năng nhận diện các rủi ro và biết cách phòng tránh chúng.

5. Người chăn cừu luôn sẵn lòng đặt những nhu cầu cấp bách và sức khoẻ của đàn cừu lên trước nhu cầu của bản thân mình

Sức khoẻ tốt của đàn cừu là vô cùng quan trọng với người chăn cừu. Mục đích khác thường này đã khích lệ các quyết định của anh ta luôn hướng tới lợi ích của đàn cừu trước tiên. Cả về nghĩa đen lẫn nghĩa bóng, người chăn cừu luôn được chuẩn bị để “hy sinh tính mạng bản thân” cho đàn cừu.

6. Có sự khác biệt giữa những đôi tay làm thuê và người chăn cừu

Những đôi tay làm thuê được khích lệ bởi các đồng tiền công. Còn người chăn cừu có mối quan tâm sâu xa và chân thành tới đàn cừu của anh ta. Anh ta là người chịu trách nhiệm cho những gì không phải của anh ta — theo đúng sự lựa chọn của anh ta. Và mối quan hệ của anh được đặc trưng vởi sự hiện diện lâu bền và xuyên suốt cho dù có hay không có tiền công.

Vào mọi thời điểm, người chăn cừu luôn sẵn lòng hy sinh cuộc sống của anh ta cho đàn cừu. Anh ta là một nhà lãnh đạo thực thụ đối với những người tưởng ở anh ta.

Người chăn cừu thực thụ hiểu rõ sự khác biệt quan trọng giữa sức mạnh (yếu tố đè nặng lên vai nhà lãnh đạo) với thẩm quyền (yếu tố thể hiện trách nhiệm và năng lực giải trình với cấp có quyền lực cao hơn).

Chắc chắn rằng, bức tranh người chăn cừu và hình ảnh nhà lãnh đạo tuy rất đơn giản, nhưng nó để lại nhiều bài học sâu sắc cho nghệ thuật quản lý ngày nay.

Nguồn: Thegioiphang.biz.n
dungnt55@fpt.com.vn

[HOW TO] Define to default configuration user on Linux.

Khi dùng lệnh user add không có option kèm theo để tạo một user, các thuộc tính của user sẽ được tìm kiếm theo cấu hình mặc định trong các file:
/etc/default/useradd
/etc/login.defs
/etc/skel

Xem nội dung file /etc/default/useradd:
#cat /etc/default/useradd:
#useradd default file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel

Thay đổi giá trị của option HOME thành /var/home:
#cat /etc/default/useradd:
#useradd default file
GROUP=100
HOME=/var/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel

- Dùng lệnh useradd tạo một user mới: userd
- Kiểm tra thấy, userd có thư mục home directory trong /var/home

- Khi tạo mới một user, nội dung trong thư mục /etc/skel sẽ được tự tạo cho mỗi user.

- File /etc/login.defs là file định nghĩa các policy liên quan đến password: độ dài, ngày hết hạn, ngày warning..
- File /etc/login.defs cũng cho phép ra định nghĩa khi tạo user mới có home dir không?
| CREATE_HOME yes

- Khi xóa user có xóa luôn group không? (Group chỉ có một member). Có xóa các cron, job không?
#USERDEL_CMD    /usr/sbin/userdel_local
|USERGROUPS_ENAB yes

- Sửa option CREATE_HOME, không cho phép tạo home dir:
|CREATE_HOME no

TiếnPT R0039

[HOW TO] Managing user on Linux?

I. Xem thông tin người dùng:

1. Tập tin /etc/passwd: là cơ sở dữ liệu các tài khoản người dùng trên linux dưới dạng tập tin văn bản.
a. Cấu trúc file passwd:
account name:password:UID:GID:description:home directory:login shell
b. Xem file passwd:
#cat /etc/passwd
root:x:0:0:root:/root:/bin/bash

2. Tập tin /etc/shadow: là nơi lưu trữ mật khẩu đã được mã hóa.
a. Cấu trúc file shadow:
b. Chú ý: cột thứ 2 trong file /etc/shadow chưa mật khẩu đã mã hóa, nếu:
          Bắt đầu bằng dấu * : tài khoản đã bị vô hiệu hóa.
          Bắt đầu bằng dấu !! : tài khoản tạm thời bị khóa.

3. Tập tin /etc/group: lưu thông tin về các nhóm.
a. Cấu trúc file /etc/group
group name:group password:GID:member account
b. Xem file group
#cat /etc/group
named:x:25:

II. Quản lý người dùng.

1. Tạo tài khoản người dùng:
#man useradd
a. Tạo người dùng:
#useradd usera


- Kiểm tra usera trong /etc/passwd | /etc/shadow | /etc/group- Khi chưa đặt pass, usera bị tạm khóa do chưa được tạo password. (!!)

b. Đặt password cho usera:
#passwd usera

Chú ý:
- Khi tạo user: nếu không đổi pass cho user, user sẽ tạm khóa và chưa sử dụng được.- Khi tạo user: không chỉ user ID thì hệ thống tự đặt ID, giá trị >=500.- Khi tạo user: ID = 0 thì user đó có quyền root- Khi tạo user: không chỉ ra home directory thì mặc định home dir nằm trong /home/
c. Bài toán thực tế:
- Tạo user có home dir là /tmp/userb và dòng mô tả "đây là userb":
#useradd -c "đây là userb" -d /tmp/userb userb

- Tạo user có home dir là /tmp/userb & thuộc group users:
#useradd -d /tmp/userb -g users userb

2. Thay đổi password người dùng:
a. Thay đổi password root
#passwd root

b. Thay đổi home dir userb là /home/userb
#usermod -d /home/userb userb

c. Thay đổi userb thuộc group tienpt
#usermod -g tienpt userb

3. Khóa và mở khóa tài khoản người dùng:
a. Khóa userb:
#passwd -l userb     (hay dùng lệnh usermod -L userb)

b. Mở khóa userb
#passwd -u userb     (hay dùng lệnh usermod -U userb)

4. Tạo nhóm người dùng:
a. Tạo nhóm group1
#groupadd group1

b. Thay đổi tên group:
#groupmod -n nhom1 group1

c. Thay đổi GID:
#groupmod -g 600 nhom1

d. Xóa nhóm:
#groupdel nhom1

TiếnPT R0039

[HOW TO] Installing package on Linux?




1. Cài đặt package:
a. Truy vấn:
#rpm -qa samba     # liệt kê các package có tên là samba
#rpm -qa samba*     #liệt kê các package có tên bắt đầu là samba
#rpm -qa | grep samba     #liệt kê các package có tên chứa samba
#rpm -qd samba     #liệt kê các tài liệu liên quan đến samba
#rpm -qi samba     #liệt kê các thông tin mô tả gói samba
#rpm -qc samba     #liệt kê các tập tin cấu hình của samba

b. Giải thích ý nghĩa các tùy chọn
-q (packagefiles):     hiển thị package
-a (all):     truy vấn tất cả package được cài đặt
-d (documentation):     liệt kê tất cả các file tài liệu liên quan đến package
-i (information):     liệt kê tất cả thông tin như package name, description, release number, size, build date,..
-c (configuration):     liệt kê các tập tin cấu hình.

2. Gỡ bỏ package:
#rpm -e samba-client-3.0.23c-2

Trường hợp gỡ bỏ package mà package còn phụ thuộc vào package khác thì dùng thêm tùy chọn: --nodeps
#rpm -e --nodeps samba-client-3.0.23c-2

Kiểm tra kết quả:
#rpm -qa | grep samba

3. Cài đặt package:
#rpm -ivh samba-3.0.25b.0.el5.4.i386.rpm

Giải thích các tùy chọn:
-i (install):     cài đặt một package
-v (verbose):     hiển thị tóm tắt kết quả sau khi cài đặc package
-h (hash):     hiển thị đấu "#" thông báo quá trình cài đặt đang tiếp diễn.

4. Cập nhật package:
#rpm -Uvh samba-3.0.25b.0.el5.4.i386.rpm

Chú ý: ta có thể dùng lệnh rpm với option:
--nodeps:     lệnh rpm sẽ bỏ qua các gói phụ thuộc
--force:     lệnh rpm sẽ bỏ qua lỗi xung đột

TiếnPT R0039




[HOW TO] configure SAMBA on Linux Mint 14

Hello Everybody,

I'm Tiến. In this post I'll show you how to setup a basic Samba Server, and how to access those shares from client (Windows, Linux)

Samba has a vast array of options and configuration settings, but here I'll show you how to setup and configure a basic Samba Server with one user.

First, you need to install Samba:
sudo apt-get install samba
Enter your password to authenticate, and apt will download and install Samba and its attendant utilities for you.

It's important to realize about Samba is that it stores its own set of user accounts, separate from the main accounts, in the /etc/samba/smbpasswd file. That mean, you'll need to create a separate Samba password for every user you want to access your file shares. You create a password  using smbpasswd command. For example, to create a command for a user named tienpt, here is how the command should look:
sudo smbpasswd -a tienpt
 tienpt's password is created. The next step is to create a home directory for him to share. Begin by creating a folder "Samba" as bellow:
mkdir /home/tienpt/Samba
Note: don't use sudo to create, because then the owning user and group will be set as "root", which means you won't be able to access the folder using your Samba user name and  password.

The next step is to edit the /etc/samba/smb.conf, the main configuration Samba. Please kindly backup before continuing:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
Now, start:
sudo vi /etc/samba/sm.conf
"Please kindly read fully"
Example:
[Test]
path = /home/tienpt/Samba
available = yes
valid users = tienpt
read only = no
browsable = yes
public = yes
writable = yes
Note: there should be no spaces between the lines and note aslo that there should be a single space both before and after each of the equal signs)

Detail:
[Test] gives the name of the file share.
"path" specifiles the location of the folder to shared.
"available" specifiles that the file share is available to clients on the network.
"vaild users" user allow to access the file share.
"read only" client will be allowed to write to the file share.
"writable" data can be written to the file share.
Restart Samba with this command:
sudo restart smbd
This will force Samba to restart, re-reading its confifuration files and activating the share you just created. Once Samba has restarted, use this command to check your smb.conf for any synctax errors:
sudo testparm
If you pass the testparm command, Samba should be working. Try accessing the share from another client on your LAN.

======================== Auto start ========================
PhanTheTien ~ # cat /etc/init/smbd.conf 
description "SMB/CIFS File Server"
author      "Steve Langasek <steve.langasek@ubuntu.com>"

start on (local-filesystems and net-device-up)
stop on runlevel [!2345]

respawn

pre-start script
RUN_MODE="daemons"

[ -r /etc/default/samba ] && . /etc/default/samba

[ "$RUN_MODE" = inetd ] && { stop; exit 0; }

install -o root -g root -m 755 -d /var/run/samba
end script

exec smbd -F

TiếnPT R0039





[HOW TO] Webmin could not start on boot?

If you did not setup webmin with https you need to to connect using http://localhost:10000 instead of https://localhost:10000.
If webmin is not starting by default on your computer you need to create a script in your /etc/init.d with this content, call the script webmin.


#!/bin/sh
# chkconfig: 235 99 10
# description: Start or stop the Webmin server
#
### BEGIN INIT INFO
# Provides: webmin
# Required-Start: $network $syslog
# Required-Stop: $network
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Start or stop the Webmin server
### END INIT INFO

start=/etc/webmin/start
stop=/etc/webmin/stop
lockfile=/var/lock/subsys/webmin
confFile=/etc/webmin/miniserv.conf
pidFile=/var/webmin/miniserv.pid
name='Webmin'

case "$1" in
'start')
    $start >/dev/null 2>&1 </dev/null
    RETVAL=$?
    if [ "$RETVAL" = "0" ]; then
        touch $lockfile >/dev/null 2>&1
    fi
    ;;
'stop')
    $stop
    RETVAL=$?
    if [ "$RETVAL" = "0" ]; then
        rm -f $lockfile
    fi
    pidfile=`grep "^pidfile=" $confFile | sed -e 's/pidfile=//g'`
    if [ "$pidfile" = "" ]; then
        pidfile=$pidFile
    fi
    rm -f $pidfile
    ;;
'status')
    pidfile=`grep "^pidfile=" $confFile | sed -e 's/pidfile=//g'`
    if [ "$pidfile" = "" ]; then
        pidfile=$pidFile
    fi
    if [ -s $pidfile ]; then
        pid=`cat $pidfile`
        kill -0 $pid >/dev/null 2>&1
        if [ "$?" = "0" ]; then
            echo "$name (pid $pid) is running"
            RETVAL=0
        else
            echo "$name is stopped"
            RETVAL=1
        fi
    else
        echo "$name is stopped"
        RETVAL=1
    fi
    ;;
'restart')
    $stop ; $start
    RETVAL=$?
    ;;
*)
    echo "Usage: $0 { start | stop | restart }"
    RETVAL=1
    ;;
esac
exit $RETVAL

Make this executable with:
sudo chmod 755 /etc/init.d/webmin
Add it to the startup procedure with:
update-rc.d webmin defaults
 After this webmin will start with your computer.

To avoid all these small things you can also download webmin as a debian package that you can install in your system.

TiếnPT R0039