Tuesday, September 27, 2016

Hướng dẫn tạo Remote Desktop VPS Linux qua VNC

- Trong công việc nhiều khi các bạn muốn remote desktop server Linux theo giao diện đồ họa bài viết sau sẽ hướng dẫn các bạn.
1. Tạo VPS CentOS 6.x qua console
2. Cài đặt Nginx
 sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
 sudo yum install nginx 
 service nginx start
3. Sử dụng HZTUT (tác giả Nguyễn Oánh)
wget https://hostingaz.vn/script/hztut/hztut-centos && chmod +x hztut-centos && ./hztut-centos
4. Cài đặt VNC client 
Tự download
5. Edit VNC Server
#vim /etc/sysconfig/vncserver
Thêm 2 dòng này vào cuối. Đây là mình cho đăng nhập qua Root
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 800x600" 
6. Conect qua Client
Nếu bạn đăng nhập qua Root thì :1 sau IP server
Nếu bạn tạo user thường đăng nhập thì :2 sau IP server

 

Thursday, August 4, 2016

Net user command : Manage user accounts from command line - Quản lý user qua script command line

Using Net user command, administrators can manage user accounts from windows command prompt. Below are some examples on how to use this command.
Add a domain user account:
Net user /add newuseLoginid  newuserPassword /domain
Add new user on local computer:
Net user /add newuserLoginid  newuserPassword
Advanced options to add new user account can be read in the below article.
Add new user from windows command line.
Disable/Lock a domain user account:
Net user loginid  /ACTIVE:NO /domain
To enable/unlock a domain user account:
Net user loginid /ACTIVE:YES  /domain
Prevent users from changing their account password:
Net user loginid /Passwordchg:No
To allow users to change their password:
Net user loginid /Passwordchg:Yes
To retrieve the settings of a user:
Net user username

Tuesday, July 19, 2016

50 câu hỏi tuyển dụng vị trí Linux system administrator

1. What does nslookup do?
2. How do you display the top most process utilizing CPU process?
3. How to check all open ports on a Linux machine and block the unused ports?
4. What is Linux? How is it different from UNIX?
5. Explain the boot process of Unix System in details.
6. How do you change the permissions? How to create a file that’s read-only property?
7. Explain SUDO in detail. What are its disadvantages?
8. What is the difference between UDP and TCP?
9. Describe the boot order of a Linux machine.
10. Design a 3-tier web application.
11. Sketch how you would route network traffic from the internet into a few subnets.
12. How do you know about virtualization? Is it good to use?
13. What are different levels of RAID and what level will you use for a web server and database server?
14. List some latest developments in open source technologies.
15. Have you ever contributed to an open source project?
16. Systems engineer or a systems administrator? Explain?
17. List some of the common unethical practices followed by a system professional.
18. What is the common size for a swap partition under a Linux system?
19. What does a nameless directory represent in a Linux system?
20. How to list all files, including hidden ones, in a directory?
21. How to add a new system user without login permissions?
22. Explain a hardlink. What happens when a hardlink is removed?
23. What happens when a sysadmin executes this command: chmod 444 chmod
24. How do you determine the private and public IP addresses of a Linux system?
25. How do you send a mail attachment using bash?
26. Tell me something about the Linux distros used on servers.
27. Explain the process to re-install Grub in Linux in the shortest manner.
28. What is an A record, an NS record, a PTR record, a CNAME record, an MX record?
29. What is a zombie process? State its causes?
30. When do we prefer a script over a compiled program?
31. How to create a simple master/slave cluster?
32. What happens when you delete the source to a symlink?
33. How to restrict an IP so that it may not use the FTP Server?
34. Explain the directory structure of Linux. What contents go in /usr/local?
35. What is git? Explain its structure and working.
36. How would you send an automated email to 100 people at 12:00 AM?
37. Tell me about ZFS file system.
38. How to change the default run level in a Linux system?
39. How would you change the kernel parameters in Linux?
40. State the differences between SSH and Telnet.
41. How would you virtualize a physical Linux machine?
42. Tell me about some quirky Linux commands.
43. Explain how HTTPS works.
44. Do you know about TOR browser? Explain its working.
45. How to trigger a forced system check the next time you boot your machine?
46. What backup techniques do you prefer?
47. Tell me something about SWAP partition.
48. Explain Ping of Death attack.
49. How do you sniff the contents of an IP packet?
50. Which OSI layer is responsible for making sure that the packet reaches its correct destination?
Nguồn: http://fossbytes.com/top-50-linux-system-administrator-interview-questions-answers/

Thursday, June 30, 2016

Delete a Windows Service in Windows 7, 8, 10, Vista, or XP

1. Trước tiên vào WIN + R và gõ services.msc
Manual service muốn tắt
2. Dùng lệnh với quyền administrator
SC delete "service name"
3. F5 lại xem service đã bị delete chưa

Thanks

Wednesday, May 18, 2016

Install telnet window server via powershell

Bạn muốn cài telnet Window server qua powershell. Điều đó vô cùng đơn giản
Run Powershell với quyền administrator

dism /online /Enable-Feature /FeatureName:TelnetClient

Reset SQL Single User Mode

Sql Server -m is the parameter you would use to start SQL in single user mode.
There are a number of reasons why you would want to do this which we will explain later in the article, but first how to quickly get your SQL box into single user mode.
These examples are done using both SQL 2008 and SQL 2012.
Open up SQL Server Configuration Manager

Single User Mode SQL 2008

Right click on the SQL Server instance and select properties | Advanced
Add a semicolon and -m to the existing start up parameters (normally you will need to follow it with a semi colon)

Tuesday, May 17, 2016

Note System 2016 - Open Source SysAdmin Resources

Automation

Automation build.
  • Apache Ant – Automation build tool, similar to make, written in Java.
  • Apache Maven – Build automation tool mainly for Java.
  • Bazel – Google’s build system.
  • GNU Make – The most popular automation build tool for many purposes.
  • Gradle – Another build automation system.

Backups

Backup software.
  • Amanda – Client-server model backup tool.
  • Attic – A deduplicating backup program written in Python.
  • Bareos – A fork of Bacula backup tool.
  • Backupninja – Lightweight, extensible meta-backup system.
  • Brebis – A fully automated backup checker
  • Burp – Network backup and restore program.
  • Duplicity – Encrypted bandwidth-efficient backup using the rsync algorithm.
  • Elkarbackup – Backup solution based on RSnapshot with a simple web interface
  • Lsyncd – File Monitor which spawns a process to synchronize the changes (rsync by default).
  • Obnam – An easy, secure, snapshots-based backup program with data de-duplication.
  • Rdiff-backup – An easy A remote incremental backup of all your files.
  • Rsnapshot – Filesystem Snapshotting Utility.
  • Snebu – Snapshot backup with global multi-client deduplication and transparent compression.
  • UrBackup – Another client-server backup system.
  • DREBS – AWS EBS backup script that supports strategies.
  • ZBackup – A versatile deduplicating backup tool.