Search Results for: ftp

How to replicate user passwords across hosts using /etc/shadow file

Introduction Today I received an interesting requirement.  A customer wanted their FTP users on several new servers (having the same username) to have the same password as that of the users on an older server. The problem was that they did not actually know the passwords of the users on the old servers. Also, the process had to be largely automated because it needed to be repeated on multiple machines. So, after some research, I was able to come up with a solution. The solution to this problem was to use the user entries from the /etc/shadow file. Before we delve into the details of how the /etc/shadow file entries for some users could allow us to replicate their passwords across several machines, let’s first understand the different fields of the /etc/shadow file. The /etc/shadow file is a text file and has permissions set to 400 i.e. -r——– and its ownership is set to root:root. This implies that it can be read by the root user only and is implemented as a needed security mechanism. Let’s view an entry from the file: [root@linuxnix ~]# grep sahil /etc/shadow sahil:$6$ufcRl1.z$HC2JFSgFZkFiprGQ/dzWIH9NcxmF.WqldAbbmy.ra4/uoAOdST.NhRZp/BKalt0JEOEdXSJj48uGJxnImuyRo0:17517:0:99999:7::: [root@linuxnix ~]# As you might’ve observed the /etc/shadow file uses the colon (:) as a delimiter to separate different fields. This is similar to the /etc/passwd file. The /etc/shadow has 8 different fields which are as follows: Username Username is user’s...

Read More

What is GIT and how to install it on Centos

Introduction A version control system is a piece of software that records changes to a file or set of files over time so that you can recall specific versions of these files at a later date. The need for version control is not limited to developers in today’s complex and mission-critical infrastructure environments. System administrators too can make efficient use of version control to track changes in their scripts and/or place different configuration files under version control. GIT is a powerful distributed version control system, perhaps the most powerful and feature-rich version control system available as of this writing. We’ve already briefly talked about the need for version control for system administrators and in this article, we will talk about how GIT came into existence and how to install it on a centos system.   History of GIT GIT was created by Linus Torvalds in 2005. It is written in Perl and C. The GIT project was essentially started as a substitute version control system for the Linux Kernel after BitKeeper withdrew its support. This project has since become immensely popular among since the emergence of the devops movement and framework and continues to increase its popularity.   GIT Design goals: Speed Simplicity Strong branch/merge support Distributed Scales well for large projects We mentioned in our introduction that GIT is a distributed version control system. Given below are the...

Read More

Linux netcat(nc) command examples – part1

  The Linux netcat(nc) command is often referred to as the Swiss army knife of networking tools, and a skilled system administrator could come up with some interesting uses for this sophisticated and versatile tool. It essentially establishes a connection between two computers and allows data to be written across the TCP and UDP transport layer protocols, and the network layer protocol IP. Netcat could even be thought of like the ‘cat’ command in Linux but for network-based communication between servers. Netcat operates in 2 modes Server mode Client mode Server mode: In the server, mode netcat listens to incoming connections depending on various parameters that may have been passed to the utility.The below syntax indicates how you would typically use netcat in the server mode: nc -l -p port [options] [hostname] [port] Client mode: In the client, mode netcat initiates a TCP/UDP connection to the same or different machine.The below syntax depicts how you would typically use netcat in the client mode: nc [-options] hostname port[s] [ports] We will be covering both methods in depth in our examples. Typical uses of the Linux netcat tool Chat server Port scanner File transfer Information fetching Chat server: We can use netcat to transfer simple text messages between two system forming a rather minimal and straightforward instant messaging interface. Port scanner: Netcat can be used to scan open ports on one or more systems. Its...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.