<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mrinal nath on Medium]]></title>
        <description><![CDATA[Stories by Mrinal nath on Medium]]></description>
        <link>https://medium.com/@mrinalnath3?source=rss-3018b4cc1200------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iwrbkXAXmS8lGS4ghzQyZw.jpeg</url>
            <title>Stories by Mrinal nath on Medium</title>
            <link>https://medium.com/@mrinalnath3?source=rss-3018b4cc1200------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 19:13:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mrinalnath3/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hands-on shell Scripting real-time example]]></title>
            <link>https://medium.com/@mrinalnath3/hands-on-shell-scripting-real-time-example-1ea8dd6359cc?source=rss-3018b4cc1200------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ea8dd6359cc</guid>
            <dc:creator><![CDATA[Mrinal nath]]></dc:creator>
            <pubDate>Thu, 09 Jan 2025 19:31:44 GMT</pubDate>
            <atom:updated>2025-01-09T19:31:44.792Z</atom:updated>
            <content:encoded><![CDATA[<p>Determine the Distributions by the script Technologies Used if, else, elif condition. Universal script for all major Linux distributions.</p><p>Check the Linux OS Version cat /etc/os-release and use grep filter out with <strong>ID </strong>and use cut command to delimiter and tr -d command to delete characters.</p><p>grep “^ID=” /etc/os-release | cut -d’=’ -f2 | tr -d ‘ “ ‘</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGBcIZpuicTvHmXV_uSCqw.png" /><figcaption>I have three different Linux distribution on this screenshot</figcaption></figure><p>This script installs Git based on the Linux distribution. It uses if, else if, and else statements to detect the OS and install Git accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kzk1O_6S6ZmOrp8evpHmdw.png" /></figure><p>#!/bin/bash</p><p>#This line is a comment. This script will allow to installation of applications based on the OS detection using if, elif, and else statements as a universal script.</p><p>echo “This script to install git on a Linux distribution”</p><p>echo “****************Installation is starting ******************”</p><p># Setting up the variable upon execution it will detect the OS ID</p><p>OS=$(grep “^ID=” /etc/os-release | cut -d’=’ -f2 | tr -d ‘“‘)</p><p>if [ “$OS” == “ubuntu” ]<br>then<br> echo “This is ubuntu operating system, installing git…..”</p><p>sudo apt install git -y</p><p>elif [ “$OS” == “centos” ]<br>then</p><p>echo “This is Centos OS, installing the git……..”<br> yum install git -y</p><p>elif [ “$OS” == “rhel” ]<br>then<br> echo “This is not Ubuntu or Centos”<br> echo “This is Red Hat Enterprise Linux”<br> sudo dnf install git -y<br>else<br> echo “OS distribution not matching hence not installing”</p><p>fi</p><p>Ubuntu server git installation screenshot.</p><p>veirfy by this command post installation</p><p>#which git</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*Hhlkfg8eSgI97Iv4fFKYIw.png" /></figure><p>In the case at hand, you can probably guess how this works: the shell runs the first group of statements between the if and the then. If the last statement executed exits successfully, it runs statements-if-true-1. Otherwise, if an elif is present, it tries the next group of statements. If the last one exits successfully, it runs statements-if true-2. It continues in this fashion until it encounters a command that exits successfully, running the corresponding group of statements. If none of the if or elif statements is true, and an else clause is present, it executes statements-if-all-else-fails. Otherwise, it does nothing. The exit status of the entire if…fi statement is that of the last command executed following a then or else. If none was executed, the exit status is 0.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ea8dd6359cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AD migration using the movetree command]]></title>
            <link>https://medium.com/@mrinalnath3/ad-migration-using-the-movetree-command-d5282f359780?source=rss-3018b4cc1200------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5282f359780</guid>
            <dc:creator><![CDATA[Mrinal nath]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 14:53:43 GMT</pubDate>
            <atom:updated>2024-07-19T14:53:43.455Z</atom:updated>
            <content:encoded><![CDATA[<h3>MovetreeAD-migration command how to make it work on Windows Server 2019.</h3><p>AD user account migration within the forest using native tools movetree.exe command. Example child domain to child or child to root domain. This command-line tool allows administrators to move Active Directory objects such as organizational units and users between the domains within a single forest. These operations are performed to support domain consolidation or organizational restructuring operations. Movetree.exe ships with Windows 2000. To set in the environment Support Tools Files required: Movetree.dll Movetree.exe and WindowsServer2003 admin pack needed.</p><p>movetree /start /s NA-BECOMADDS03.na.becomnet.com /d BLR-BECOMADDS01.becomnet.com /sdn “CN=test, move,ou=Becomusersou,DC=na,DC=becomnet,DC=com” /ddn “CN=test, move,OU=Becomnetusers,DC=becomnet,DC=com” /verbose</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*okmcBPaEYbGu9-xI01zQbw.png" /></figure><figure><img alt="Movetree execution command screenshot" src="https://cdn-images-1.medium.com/max/1024/1*HF1bnflvrWb87PbVtcTNhA.png" /></figure><p>movetree /start /s NA-BECOMADDS03.na.becomnet.com /d BLR-BECOMADDS01.becomnet.com /sdn “CN=test, move,ou=Becomusersou,DC=na,DC=becomnet,DC=com” /ddn “CN=test, move,OU=Becomnetusers,DC=becomnet,DC=com” /verbose</p><p>Note:<br>I have used “CN=test\, move. Because I have user display name “Test, Move”</p><p>The user’s password must be of the length required by the destination domain. For example, if the user has a 12-character password as required by the source domain destination domain requires a 12-digit password Verify the user’s group membership before moving a user account. Global groups are limited to having members from the domain the group exists in.</p><p>There is one exception to this rule: If a user’s primary group is the Domain Users global group, and the user isn’t a member of any other global groups, the move will be successful. The best practice is to export the user’s group membership and remove the group membership before executing the move tree command.</p><p>movetree.dll, movetree.exe and windowsserver2003 admin pack you can download from my github repo.</p><p>Download the files from the repository <br>WindowsServer2003-KB340178-SP2-x86-ENU<br>Copy Movetree.dll to C:\Windows\SysWOW64<br>Copy Movetree.exe to C:\Windows\System32<br>install Adminpack WindowsServer2003-KB340178-SP2-x86-ENU</p><p><a href="https://github.com/mrinalnath3/movetreeAD-migration.git">https://github.com/mrinalnath3/movetreeAD-migration.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5282f359780" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>