<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>System Network Programming Solution - Linux - windows - centos- security- cpanel - plesk -directadmin helm&#187; FreeBSD</title>
	<atom:link href="http://thegioinguonmo.com/tag/freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://thegioinguonmo.com</link>
	<description>SHARING EVERYTHING</description>
	<lastBuildDate>Sat, 19 May 2012 21:40:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>FreeBSD How to restart inetd service / daemon</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-how-to-restart-inetd-service-daemon.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-how-to-restart-inetd-service-daemon.html#comments</comments>
		<pubDate>Fri, 18 May 2012 21:42:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[HUP]]></category>
		<category><![CDATA[killall]]></category>
		<category><![CDATA[root user]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[use]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1600</guid>
		<description><![CDATA[inetd is referred to as the Internet Super-Server because it manages connections for several services. When a connection is received by inetd, it determines which program the connection is destined for, spawns the particular process and delegates the socket to it. First login as a root user. FreeBSD version 5.0/6.0 or later Newer version of [...]]]></description>
			<content:encoded><![CDATA[<p>inetd is referred to as the Internet Super-Server because it manages connections for several services. When a connection is received by inetd, it determines which program the connection is destined for, spawns the particular process and delegates the socket to it. First login as a root user.</p>
<h3>FreeBSD version 5.0/6.0 or later</h3>
<p>Newer version of FreeBSD has special start, stop, restart script, you can use this script restart inetd:</p>
<pre>#/etc/rc.d/inetd restart</pre>
<p>Old method (works on all variant of UNIX/Linux/BSD oses)<br />
Once you made changes to inetd (internet super-server)configuration file (/etc/inetd.conf) you can use kill or killall command as follows to restart inetd:</p>
<pre># killall -HUP inetd</pre>
<p>OR</p>
<pre># kill -HUP inetd</pre>
<p>OR</p>
<pre># kill -HUP `cat /var/run/inetd.pid`</pre>
<p>This causes the inetd program to restart and examine its configuration files. This is especially useful if you have changed the configuration settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-how-to-restart-inetd-service-daemon.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD &gt; which directories (PATHs) used to load device drivers (modules)?</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html#comments</comments>
		<pubDate>Fri, 24 Feb 2012 21:43:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Loader]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[module path]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1619</guid>
		<description><![CDATA[The kldconfig utility displays or modifies the search path used by the kernel when loading modules using the kldload utility or the kldload syscall. You can also use sysctl command (the sysctl utility retrieves kernel state). Try any one of the following command as a root user: 1) To get PATH (or directories name) type [...]]]></description>
			<content:encoded><![CDATA[<p>The kldconfig utility displays or modifies the search path used by the<br />
kernel when loading modules using the kldload utility or the<br />
kldload syscall. You can also use sysctl command (the sysctl utility retrieves kernel state). Try any one of the following command as a root user:</p>
<p>1) To get PATH (or directories name) type command:</p>
<p># sysctl kern.module_path</p>
<p>OR</p>
<p># kldconfig -r</p>
<p>2) The path can modified in /boot/loader.conf file, open this file and look for entry called <strong>module_path</strong>:</p>
<p># grep &#8220;modile_path&#8221; /boot/loader.conf</p>
<p><em>module_path=&#8221;/boot/kernel;/boot/modules;/modules;/new/path&#8221; </em></p>
<p>Note you must open /boot/loader.conf file to change path settings using text editor:</p>
<p># vi /boot/loader.conf</p>
<p>And make changes to file.</p>
<p>3) Reboot system to take effect.</p>
<p>4) Or on fly, you can add/append path using kldconfig utility, read man page for more info.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html" title="centos loader conf">centos loader conf</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html" title="centos portaudit">centos portaudit</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html" title="kldload module path">kldload module path</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html" title="programming freebsd">programming freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html" title="shell script freebsd">shell script freebsd</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD Enable Security Port Auditing to Avoid Vulnerabilities With portaudit</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html#comments</comments>
		<pubDate>Sun, 18 Dec 2011 06:09:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1818</guid>
		<description><![CDATA[This is new nifty and long term demanded feature in FreeBSD. A port called portaudit provides a system to check if installed ports are listed in a database of published security vulnerabilities. After installation it will update this security database automatically and include its reports in the output of the daily security run. If you [...]]]></description>
			<content:encoded><![CDATA[<p>This is new nifty and long term demanded feature in FreeBSD. A port called portaudit provides a system to check if installed ports are listed in a database of published security vulnerabilities. After installation it will update this security database automatically and include its reports in the output of the daily security run. If you get message like as follows</p>
<blockquote><p>Vulnerability check disabled, database not found</p></blockquote>
<p>You need install small port called portaudit. From the man page:</p>
<blockquote><p>portaudit checks installed packages for known vulnerabilities and generates reports including references to security advisories. Its intended audience is system administrators and individual users. portaudit checks installed packages for known vulnerabilities and generates reports including references to security advisories. Its intended audience is system administrators and individual users.</p></blockquote>
<h2>Install portaudit</h2>
<p>1) Install port auditing (login as root)<br />
<code># cd /usr/ports/ports-mgmt/portaudit</code><br />
Please note that old portaudit port was located at /usr/ports/security/portaudit/.<br />
2) Install portaudit:<br />
<code># make install clean</code><br />
Output:</p>
<pre>===&gt;  WARNING: Vulnerability database out of date, checking anyway
===&gt;  Extracting for portaudit-0.5.12
===&gt;  Patching for portaudit-0.5.12
===&gt;  Configuring for portaudit-0.5.12
===&gt;  Building for portaudit-0.5.12
===&gt;  Installing for portaudit-0.5.12
===&gt;   Generating temporary packing list
===&gt;  Checking if ports-mgmt/portaudit already installed
===&gt;   Compressing manual pages for portaudit-0.5.12
===&gt;   Registering installation for portaudit-0.5.12
===&gt;  Cleaning for portaudit-0.5.12</pre>
<p>3) Fetch the database so that port auditing get activated immediately. By default it install a shell script &#8216;portaudit&#8217; in /usr/local/etc/periodic/security/:<br />
<code># /usr/local/sbin/portaudit -Fda</code><br />
Output:</p>
<pre>auditfile.tbz                                 100% of   47 kB  405 kBps
New database installed.
Database created: Wed Feb 27 06:10:01 CST 2008
0 problem(s) in your installed packages found.</pre>
<p>Where,</p>
<ul>
<li>-F: Fetch the current database from the FreeBSD servers.</li>
<li>-d: Print the creation date of the database.</li>
<li>-a: Print a vulnerability report for all installed packages</li>
</ul>
<p>4) portaudit script automatically get called via FreeBSD&#8217;s periodic (cron job) facility. So your database get updated automatically everyday.</p>
<p>Let us assume you would like to install a port called sudo. If it has known vulnerabilities it will not install sudo:<br />
<code># cd /usr/ports/security/sudo<br />
# make install clean</code></p>
<pre>===&gt;  <strong>sudo-1.6.8.7 has known vulnerabilities:</strong>
=&gt; <strong>sudo -- local race condition vulnerability.</strong>
   Reference: &amp;tt;http://www.FreeBSD.org/ports/portaudit/3bf157fa-
e1c6-11d9-b875-0001020eed82.html&gt;
=&gt; Please update your ports tree and try again.
*** Error code 1
Stop in /usr/ports/security/sudo.</pre>
<p>For more information refer portaudit man page:<br />
<code>$ man portaudit</code></p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="centos chflags command">centos chflags command</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="freebsd periodic restart server">freebsd periodic restart server</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="how to avoid vulnerabilities in network">how to avoid vulnerabilities in network</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="install portaudit in centos">install portaudit in centos</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="MySQL: ON MSSQL: ON Oracle: ON MSSQL: ON PostgreSQL: ON cURL: ON WGet: ON Fetch: OFF Perl: ON">MySQL: ON MSSQL: ON Oracle: ON MSSQL: ON PostgreSQL: ON cURL: ON WGet: ON Fetch: OFF Perl: ON</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Script To Notify Admin User if UNIX / Linux System Load Crossed Certain Limit</title>
		<link>http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html</link>
		<comments>http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 16:52:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[shell script]]></category>
		<category><![CDATA[echo hostname]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[gnu gpl version]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[Load]]></category>
		<category><![CDATA[min]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[TEMPFILE]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1802</guid>
		<description><![CDATA[#!/bin/bash # # Script to notify admin user if Linux,FreeBSD load crossed certain limit # It will send an email notification to admin. # # Copyright 2005 (c) nixCraft project # This is free script under GNU GPL version 2.0 or above. # Support/FeedBack/comment : http://cyberciti.biz/fb/ # Tested os: # * RedHat Linux # * [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush:shell">#!/bin/bash
#
# Script to notify admin user if Linux,FreeBSD load crossed certain limit
# It will send an email notification to admin.
#
# Copyright 2005 (c) nixCraft project
# This is free script under GNU GPL version 2.0 or above.
# Support/FeedBack/comment :  http://cyberciti.biz/fb/
# Tested os:
# * RedHat Linux
# * Debain Linux
# * FreeBSD
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------

# Set up limit below
NOTIFY="6.0"

# admin user email id
EMAIL="root"

# Subject for email
SUBJECT="Alert $(hostname) load average"

# -----------------------------------------------------------------

# Os Specifc tweaks do not change anything below <img src='http://thegioinguonmo.com/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Shell Script To Notify Admin User if UNIX / Linux System Load Crossed Certain Limit" class='wp-smiley' title="Shell Script To Notify Admin User if UNIX / Linux System Load Crossed Certain Limit" />
OS="$(uname)"
TRUE="1"
if [ "$OS" == "FreeBSD" ]; then
        TEMPFILE="$(mktemp /tmp/$(basename $0).tmp.XXX)"
	FTEXT='load averages:'
elif [ "$OS" == "Linux" ]; then
        TEMPFILE="$(mktemp)"
	FTEXT='load average:'
fi

# get first 5 min load
F5M="$(uptime | awk -F "$FTEXT" '{ print $2 }' | cut -d, -f1) | sed 's/ //g'"
# 10 min
F10M="$(uptime | awk -F "$FTEXT" '{ print $2 }' | cut -d, -f2) | sed 's/ //g'"
# 15 min
F15M="$(uptime | awk -F "$FTEXT" '{ print $2 }' | cut -d, -f3) | sed 's/ //g'"

# mail message
# keep it short coz we may send it to page or as an short message (SMS)
echo "Load average Crossed allowed limit $NOTIFY." &gt;&gt; $TEMPFILE
echo "Hostname: $(hostname)" &gt;&gt; $TEMPFILE
echo "Local Date &amp; Time : $(date)" &gt;&gt; $TEMPFILE

# Look if it crossed limit
# compare it with last 15 min load average
RESULT=$(echo "$F15M &gt; $NOTIFY" | bc)

# if so send an email
if [ "$RESULT" == "$TRUE" ]; then
        mail -s "$SUBJECT" "$EMAIL" &lt; $TEMPFILE
fi

# remove file
rm -f $TEMPFILE</pre>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html" title="adm user script unix">adm user script unix</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html" title="how to notify users by mail in unix system">how to notify users by mail in unix system</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html" title="script to notify admin user if linux freebsd load crossed certain limit # it will send an email notification to admin">script to notify admin user if linux freebsd load crossed certain limit # it will send an email notification to admin</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html" title="unix notify user login">unix notify user login</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html" title="unix script to notify of password">unix script to notify of password</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html" title="uptime | awk -f $ftext \">uptime | awk -f $ftext \</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/programing/shell-script/shell-script-to-notify-admin-user-if-unix-linux-system-load-crossed-certain-limit.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell script to General FreeBSD and Linux System information</title>
		<link>http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html</link>
		<comments>http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 16:49:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[shell script]]></category>
		<category><![CDATA[echo hostname]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[gnu gpl version]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[Linux System]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[RAM]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1798</guid>
		<description><![CDATA[Shell script to display general FreeBSD and Linux System information such as, Hostname, OS version, Kernel version, Processor/CPU, Total RAM, System load, network interface, total logged in users, Hard disks, Runlevel etc in neat format. How do I use the script? You need to download following two files for FreeBSD operating systems: File # 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Shell script to display general FreeBSD and Linux System information such as, Hostname, OS version, Kernel version, Processor/CPU, Total RAM, System load, network interface, total logged in users, Hard disks, Runlevel etc in neat format.</p>
<h3>How do I use the script?</h3>
<p>You need to download following two files for <strong>FreeBSD</strong> operating systems:</p>
<ol>
<li><a rel="nofollow" target="_blank" href="http://bash.cyberciti.biz/bms/init/functions.FreeBSD">File # 1</a> Save this file as /usr/local/etc/bashmonscripts</li>
<li><a rel="nofollow" target="_blank" href="http://bash.cyberciti.biz/bms/init/paths.FreeBSD">File # 2</a> : Save this file as /usr/local/etc/defaults.conf</li>
</ol>
<p>For Linux system, you need to update /usr/local/etc/defaults.conf to point out exact binary path location. /usr/local/etc/bashmonscripts is nothing but functions library used by this script. bashmonscripts works under both Linux and FreeBSD.</p>
<pre class="brush:shell">#!/bin/bash
# Shell script to General FreeBSD and Linux System information such as:
# Hostname, OS version, Kernel version, Processor/CPU, Total RAM,
# System load, network interface, total logged in users, Hard disks,
# Runlevel etc. I will write separate scripts for detailed system
# information <img src='http://thegioinguonmo.com/wp-includes/images/smilies/icon_biggrin.gif' alt="icon biggrin Shell script to General FreeBSD and Linux System information" class='wp-smiley' title="Shell script to General FreeBSD and Linux System information" />
# Copyright (c) 2005 nixCraft project
# This script is licensed under GNU GPL version 2.0 or above
# For more info, please visit:
#            http://cyberciti.biz/shell_scripting/bmsinstall.php
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------

SPATH="/usr/local/etc/bashmonscripts"
INITBMS="$SPATH/defaults.conf"
[ ! -f $INITBMS ] &amp;&amp; exit 1 || . $INITBMS

echo "Hostname:" $(getHostName)
echo "OS Name:" $($UNAME)
echo "OS Version:" $($UNAME -mr)
echo "Processor:" $(getCpuInfo)
echo "Total Physical Memory (RAM):" $(getRealRamInfo)
echo "System Load:" $(getSystemLoad)
echo "Date &amp; Time:" $($DATE)
echo "Network interface:" $(getNumberOfInterfaces)
echo "Total logged in users:" $(getNumberOfLoggedInUsers)
echo "Total running process:" $(getNumberOfRunningProcess)
echo "Total SCSI/IDE disks:" $(getDiskDrives)
echo "Mounted partitions:" $(getNumberOfParittions)
echo "Loaded dynamic kernel modules/drivers:" $(getNumberOfKernelModules)
echo "OS Rulevel:" $(getOsRunLevel)</pre>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="echo total memory">echo total memory</a> (2)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="linux shell freebsd">linux shell freebsd</a> (2)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="shell script to find freebsd memory">shell script to find freebsd memory</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="shell script echo read freebsd">shell script echo read freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="shell freebsd system info">shell freebsd system info</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="shell freebsd">shell freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="server network information system script in linux">server network information system script in linux</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="sample shell script get hardware info for freebsd">sample shell script get hardware info for freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="php shell script in freebsd">php shell script in freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="linux system information cpu ram shell">linux system information cpu ram shell</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD: How to write protect important file ( even root can NOT modify / delete file )</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-how-to-write-protect-important-file-even-root-can-not-modify-delete-file.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-how-to-write-protect-important-file-even-root-can-not-modify-delete-file.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 16:14:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[passwd]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[root user]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1758</guid>
		<description><![CDATA[The chflags utility modifies the file flags of the listed files as specified by the flags operand. FreeBSD offers write protection, you need to to set special bit call immutable. Once this bit is setup no one can delete or modify file including root. And only root can clear the File immutable bit. You must [...]]]></description>
			<content:encoded><![CDATA[<p>The chflags utility modifies the file flags of the listed files as specified by the flags operand.</p>
<p>FreeBSD offers write protection, you need to to set special bit call immutable. Once this bit is setup no one can delete or modify file including root. And only root can clear the File immutable bit.</p>
<p>You must be a root user to setup or clear the immutable bit.</p>
<h2>Setup file immutable bit</h2>
<p>Use chflags command as follows:<br />
<code># chflags schg /tmp/test.doc</code><br />
Try to remove or moify file file with rm or vi:<br />
<code># rm -f /tmp/test.doc</code><br />
Output:</p>
<pre>rm: /tmp/test.doc: Operation not permitted</pre>
<p>Now root user is not allowed to remove or modify file. This is useful to protect important file such as /etc/passwd, /etc/master.passwd etc.</p>
<h2>Display if file immutable bit is on or off</h2>
<p><code>ls -lo /tmp/test.doc</code><br />
Output:</p>
<pre>-rw-r--r--  1 root  wheel  <strong>schg</strong> 19 Jun 29 22:22 /tmp/test.doc</pre>
<h2>Clear or remove file immutable bit</h2>
<p><code>#chflags noschg /tmp/test.doc</code><br />
Now you can remove or modify file. Please note that immutable flag can be set by root user only. chflags also supports few other interesting flags.</p>
<ul>
<li><strong>arch</strong>: set the archived flag</li>
<li><strong>nodump</strong>: set the nodump flag</li>
<li><strong>sappnd</strong>: set the system append-only flag</li>
<li><strong>schg</strong>: set the system immutable flag</li>
<li><strong>sunlnk</strong>: set the system undeletable flag</li>
<li><strong>uappnd</strong>: set the user append-only flag</li>
<li><strong>uchg</strong>: set the user immutable flag</li>
<li><strong>uunlnk</strong>: set the user undeletable flag</li>
</ul>
<p>Putting the letters no before an option causes the flag to be turned off.</p>
<p>Please note Linux also supports immutable flag to write protect files using chattr command.</p>
<p>See man page chflags and ls commands for more information.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-how-to-write-protect-important-file-even-root-can-not-modify-delete-file.html" title="configure: error: ogg needed rhel">configure: error: ogg needed rhel</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-how-to-write-protect-important-file-even-root-can-not-modify-delete-file.html" title="test command linux write protected">test command linux write protected</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-how-to-write-protect-important-file-even-root-can-not-modify-delete-file.html" title="write protect files on network">write protect files on network</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-how-to-write-protect-important-file-even-root-can-not-modify-delete-file.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD IP Alias: Setup 2 or More IP address on One NIC</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:59:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[interface name]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[netmask]]></category>
		<category><![CDATA[Sample]]></category>
		<category><![CDATA[setup]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1737</guid>
		<description><![CDATA[IP aliasing is the process of assigning more than one IP address to a network interface. This is useful for Apache web server virtual hosting or other network servers such as ftp server. This tutorial explains how to assign one or more IP address to a single network interface under FreeBSD operating system. It is [...]]]></description>
			<content:encoded><![CDATA[<p>IP aliasing is the process of assigning more than one IP address to a network interface. This is useful for Apache web server virtual hosting or other network servers such as ftp server.</p>
<p>This tutorial explains how to assign one or more IP address to a single network interface under FreeBSD operating system.</p>
<p>It is possible to create network alias or assign 2 ip address to a single NIC under FreeBSD operating system.</p>
<h2>Our Sample Setup</h2>
<ul>
<li>Interface name: <strong>lnc0</strong> &#8211; IP : 192.168.1.1/255.255.255.0</li>
<li>Interface name: <strong>lnc0 alias </strong>- IP : 192.168.1.5/255.255.255.255</li>
</ul>
<p>Netmask must be different otherwise you will get an error <strong>ifconfig: ioctl (SIOCAIFADDR): File exists</strong>.</p>
<h2>Set ip alias using ifconfig command line utility</h2>
<p>Login as the root user.</p>
<p>Now, use ifconfig command as follows to set alias:<br />
<code># ifconfig lnc0 192.168.1.5 netmask 255.255.255.255 alias</code></p>
<h2>Persistent IP Alias Configuration</h2>
<p>Edit file /etc/rc.conf to setup persistent ip aliasing option by appending following configuration, so that next time FreeBSD comes up (after restart/shutdown) it will create alias for you:<br />
<code>ifconfig_lnc0_alias0="192.168.1.5 netmask 255.255.255.255"</code></p>
<p>Finally, <a rel="nofollow" target="_blank" href="http://www.cyberciti.biz/tips/freebsd-how-to-start-restart-stop-network-service.html">Restart FreeBSD network service</a> using network restart script:<br />
<code># /etc/rc.d/netif restart &amp;&amp; /etc/rc.d/routing restart</code><br />
Display alias and real ip using ifconfig lnc0 command:<br />
<code># ifconfig lnc0</code><br />
Sample output:</p>
<pre>lnc0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet6 fe80::20c:29ff:fe01:ddbd%lnc0 prefixlen 64 scopeid 0x1
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.5 netmask 0xffff</pre>
<h3>Sample /etc/rc.conf file with IP aliasing</h3>
<p>Here is my /etc/rc.conf file with em0 and em1 interface with 5 aliases:</p>
<pre>hostname="sun.nixcraft.in"
# default vsnl router interface
defaultrouter="202.54.1.200"
# Force 10Mbps for both public and private LAN interace
ifconfig_em0="inet 10.20.110.2 netmask 255.255.255.192 media 10baseT/UTP mediaopt full-duplex"
ifconfig_em1="inet 202.52.1.2 netmask 255.255.255.248 media 10baseT/UTP mediaopt full-duplex"
ifconfig_em0_alias0="inet 10.20.1.226 netmask 255.255.255.0"
ifconfig_em0_alias1="inet 10.20.1.227 netmask 255.255.255.0"
ifconfig_em0_alias2="inet 10.20.1.228 netmask 255.255.255.0"
ifconfig_em0_alias3="inet 10.20.1.229 netmask 255.255.255.0"
ifconfig_em0_alias4="inet 10.20.1.230 netmask 255.255.255.0"
# static routing configuration
static_routes="lan0"
route_lan0="-net 10.0.0.0/8 10.20.110.1"</pre>
<h2>Further readings:</h2>
<ul>
<li>Read ifconfig man page.</li>
</ul>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="freebsd ip alias">freebsd ip alias</a> (7)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="rc conf gateway router interface alias">rc conf gateway router interface alias</a> (2)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="directadmin 2 ips 2 netmask">directadmin 2 ips 2 netmask</a> (2)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="ipalias error">ipalias error</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="how to create persistent IP aliases on linux">how to create persistent IP aliases on linux</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="freebsd setup 2 ip diffrent routers">freebsd setup 2 ip diffrent routers</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="freebsd network interface script">freebsd network interface script</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="@vsnl net 10mbps">@vsnl net 10mbps</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="freebsd interface alias 2011">freebsd interface alias 2011</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="freebsd alias interface">freebsd alias interface</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD Display Information About The System Hardware</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:49:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[uname]]></category>
		<category><![CDATA[use]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1723</guid>
		<description><![CDATA[FreeBSD comes with different utilities, which can be use to gathered the information as per your needs. uname command is use to print system information. dmesg command is use to print kernel ring buffer information. sysctl command is use to configure kernel parameters at runtime as well as to read hardware information. Following list summaries, [...]]]></description>
			<content:encoded><![CDATA[<p>FreeBSD comes with different utilities, which can be use to gathered the information as per your needs. uname command is use to print system information. dmesg command is use to print kernel ring buffer information. sysctl command is use to configure kernel parameters at runtime as well as to read hardware information.</p>
<p>Following list summaries, all the command you need to gather FreeBSD hardware information.</p>
<p>1) Determining the Hardware Type/platform:<br />
<code># uname -m</code><br />
2) Determining machine processor architecture:<br />
<code># uname -p</code><br />
3) Determining FreeBSD release level:<br />
<code># uname -r</code><br />
Generally, following command is use to get all info at a time:<br />
<code># uname -mrs</code><br />
Output:</p>
<pre>FreeBSD 5.0-RELEASE i386</pre>
<p>4) Determining CPU information such as speed, make etc<br />
<code># dmesg | grep CPU</code><br />
Output:</p>
<pre>CPU: Pentium 4 (1716.41-MHz 686-class CPU)
acpi_cpu0:  on acpi0
acpi_cpu: CPU throttling enabled, 8 steps from 100% to 12.5%</pre>
<p>5) Determining real and available memory to FreeBSD:<br />
<code># dmesg | grep memory</code><br />
Output:</p>
<pre>real memory  = 201326592 (192 MB)
avail memory = 188555264 (179 MB)</pre>
<p>Alternatively, try following command to grab memory information:<br />
<code># sysctl -a | grep hw.*mem<br />
# sysctl -a | grep mem</code><br />
Output:</p>
<pre>hw.physmem: 194985984
hw.usermem: 167641088
hw.cbb.start_memory: 2281701376</pre>
<p>Note systcl has more info, just type the <strong>sysctl command</strong> to see rest of all information:<br />
<code># sysctl -a | less</code><br />
6) Determining how long a system has been up:<br />
<code># uptime</code><br />
7) Determining when a system was last rebooted or shutdown:<br />
<code># last -1 reboot<br />
# last -1 shutdown</code><br />
 <img src='http://thegioinguonmo.com/wp-includes/images/smilies/icon_cool.gif' alt="icon cool FreeBSD Display Information About The System Hardware" class='wp-smiley' title="FreeBSD Display Information About The System Hardware" /> Determining swap file system usage<br />
<code># swapinfo -k</code><br />
9) Determining who is logged in and what they are doing. Following all commands can be used. users command displays the list of all logged in users only.<br />
<code># w<br />
# who<br />
# users<br />
</code><br />
10) Find out when user was last logged in &#8211; You can use last command as follows:<br />
<code># last user-name</code><br />
(a) To find out user vivek was last logged, enter:<br />
<code># last vivek</code></p>
<p>See FreeBSD <a rel="nofollow" target="_blank" href="http://bash.cyberciti.biz/monitoring/getsysinfo.bash.html">getsysinfo.bash</a> script. It is use to find general FreeBSD system information such as, hostname, OS version, Kernel version, Processor/CPU, Total RAM, System load, network interface, total logged in users, Hard disks, Runlevel etc. Make sure your read the detailed <a rel="nofollow" target="_blank" href="http://bash.cyberciti.biz/bmsinstall.php">installation instruction</a>.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="dmesg grep cpu freebsd">dmesg grep cpu freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="how to show system users list freebsd">how to show system users list freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="get cpu and ram information with php on freebsd">get cpu and ram information with php on freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd script to display system information">freebsd script to display system information</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd list of hardware system">freebsd list of hardware system</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd list hw">freebsd list hw</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd list hardware command">freebsd list hardware command</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd dmesg ram">freebsd dmesg ram</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd display system parameter">freebsd display system parameter</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd display information about the system hardware and software">freebsd display information about the system hardware and software</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD &gt; Init to reboot or shutdown system</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:48:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[init]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[single user mode]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1721</guid>
		<description><![CDATA[FreeBSD init works different ways. In BSD style, it specifies the kernel security level as follows: -1: Permanently insecure mode. 0: Insecure mode 1: Secure mode 2: Highly secure mode 3: Network secure mode You can get current security level (FreeBSD runlevel) using sysctl command: # sysctl –a &#124; grep kern.securelevel You can setup new [...]]]></description>
			<content:encoded><![CDATA[<p>FreeBSD init works different ways. In BSD style, it specifies the kernel security level as follows:<br />
-1: Permanently insecure mode.<br />
0: Insecure mode<br />
1: Secure mode<br />
2: Highly secure mode<br />
3: Network secure mode</p>
<p>You can get current security level (FreeBSD runlevel) using sysctl command:<br />
<strong># sysctl –a | grep kern.securelevel</strong></p>
<p>You can setup new security level in /etc/rc.conf file:<br />
1) Open file in text editor<br />
<strong># vi /etc/rc.conf</strong></p>
<p>2) Add or modify following:<br />
<strong>kern_securelevel_enable=&#8221;YES&#8221; # kernel security level<br />
kern_securelevel=&#8221;2&#8243; # range: -1..3 as above </strong></p>
<p>3) Save the changes. Exit and restart FreeBSD.</p>
<p>If init used from command line i.e as a user process, init will emulate AT&amp;T System V UNIX behavior as follows:</p>
<p>0: Halt and turn the power off<br />
1: Go to single-user mode<br />
6: Reboot the machine<br />
c: Block further logins<br />
q: Rescan the /etc/ttys file</p>
<p>1) To halt and turn the power off type:<br />
<strong># init 0</strong></p>
<p>2) You can also use normal halt or shutdown command to shutdown system.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="centos shutdown restart init 0">centos shutdown restart init 0</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="different power off shutdown init halt">different power off shutdown init halt</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="freebsd halt reboot">freebsd halt reboot</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="freebsd init network-security">freebsd init network-security</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="freebsd user login poweroff">freebsd user login poweroff</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="freebsd users add restart shutdown">freebsd users add restart shutdown</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="what is the command for asterisk to restart and shutdown init 0">what is the command for asterisk to restart and shutdown init 0</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD / Linux: Sending a Message to Windows Workstation with smbclient command</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:47:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[EOF]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Message]]></category>
		<category><![CDATA[samba server]]></category>
		<category><![CDATA[solaris unix]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1719</guid>
		<description><![CDATA[You can use utility smbclient (part of samba server) to send a message to windows system from FreeBSD (or even from Linux/Solaris/UNIX OS). This command lets you send messages to windows workstations, display browse lists, and connect to SMB shares. Genral syntax of to send a message is as follows: smbclient -M &#60;WINDOW-SYSTEM-NAME&#62; &#60;&#60;EOF Message [...]]]></description>
			<content:encoded><![CDATA[<p>You can use utility smbclient (part of samba server) to send a message to windows system from FreeBSD (or even from Linux/Solaris/UNIX OS). This command lets you send messages to windows workstations, display browse lists, and connect to SMB shares. Genral syntax of to send a message is as follows:</p>
<blockquote><p>smbclient -M &lt;WINDOW-SYSTEM-NAME&gt; &lt;&lt;EOF<br />
Message<br />
Message<br />
&#8230;<br />
..<br />
&#8230;<br />
When the message is complete, press Control-D.</p></blockquote>
<h2>Send message to Windows system from Linux/ FreeBSD</h2>
<p>To send a message &#8220;Meeting canceled&#8221; to windows system called joyxp<br />
<code>$ smbclient -M joyxp &lt;&lt;EOF</code><br />
Output:</p>
<pre>Meeting canceled
See you at coffee house in 2 hrs.
--Vivek
EOF</pre>
<p>With –U you can specify the username.<br />
<code>$ smbclient -M myxp -U VIVEK &lt;&lt;EOF<br />
Meeting cancelled<br />
See you at coffee house in 2 hrs.<br />
EOF</code></p>
<p><img src="http://www.cyberciti.biz/nixcraft/vivek/blogger/xpmessage.jpg" alt="xpmessage FreeBSD / Linux: Sending a Message to Windows Workstation with smbclient command"  title="FreeBSD / Linux: Sending a Message to Windows Workstation with smbclient command" /></p>
<p>This tip also works with Linux and other UNIX variant with Samba client utilities package. Read man page of smbclient for more information.<br />
<code>man smbclient</code></p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="free bsd send message to windows network">free bsd send message to windows network</a> (2)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="freeBSD network message to windows">freeBSD network message to windows</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="linux send network message">linux send network message</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="linux smbclient send message to ip">linux smbclient send message to ip</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="send message to windows machine from linux">send message to windows machine from linux</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="send windows command from linux server">send windows command from linux server</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="smbclient send message">smbclient send message</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: thegioinguonmo.com @ 2012-05-20 18:32:11 -->
