<?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>Mon, 06 Feb 2012 09:45:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<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>Thu, 02 Feb 2012 21:42:43 +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>
]]></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 plesk git user">centos plesk git user</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="git server on centos with cpanel">git server on centos with cpanel</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="freebsd vulnerability check disabled database not found">freebsd vulnerability check disabled database not found</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="freebsd vietnam">freebsd vietnam</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="download linux git-1 7 4 src tarball">download linux git-1 7 4 src tarball</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="does kern securelevel limit kldload">does kern securelevel limit kldload</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="directadmin spam filter uppercase lowercase">directadmin spam filter uppercase lowercase</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="cpanel vulnerability">cpanel vulnerability</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="centos send display windows">centos send display windows</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-enable-security-port-auditing-to-avoid-vulnerabilities-with-portaudit.html" title="php imagemagick install centos">php imagemagick install centos</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="linux admin shell script">linux admin shell script</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="linux system load average limits">linux system load average limits</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="shell script email notification when root password">shell script email notification when root 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="shell script if -a">shell script if -a</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="shell script if admin then">shell script if admin then</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="shell script in unix to notify users">shell script in unix to notify users</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 shell script if">unix shell script if</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="apache uname -a: linux">apache uname -a: linux</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="system information shell script in linux">system information shell 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="system information freebsd">system information freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="system info centos users memory bash script">system info centos users memory bash script</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 system info mod">shell script system info mod</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 read system ram freebsd">shell script read system ram 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 script information about network">shell script information about network</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 get system configuration linux">shell script get system configuration linux</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="shell programing">shell programing</a> (1)</li><li><a href="http://thegioinguonmo.com/programing/shell-script/shell-script-to-general-freebsd-and-linux-system-information.html" title="migrate user accounts from freebsd to linux">migrate user accounts from freebsd to linux</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="remove system protected files freebsd">remove system protected files freebsd</a> (2)</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="freebsd howto">freebsd howto</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="include the -total-check flag to skip this test making sure the -notal-check flag follows -all or -autorecon1 in the command string">include the -total-check flag to skip this test making sure the -notal-check flag follows -all or -autorecon1 in the command string</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="linux write protect file root user">linux write protect file root user</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> (4)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-ip-alias-setup-2-or-more-ip-address-on-one-nic.html" title="alias0 freebsd">alias0 freebsd</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="network script 2 ips 1 alias">network script 2 ips 1 alias</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="ipaliases in directadmin">ipaliases in directadmin</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="ip alias freebsd">ip alias freebsd</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 alias name">freebsd network interface alias name</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 alias pf">freebsd network alias pf</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 ip alias ifconfig">freebsd ip alias ifconfig</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 ifconfig alias howto">freebsd ifconfig alias howto</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 em0 재시작">freebsd em0 재시작</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="command to show system information freebsd">command to show system information freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="linux hardware info">linux hardware info</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="info network freebsd">info network freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="how to command show hardware network on freebsd">how to command show hardware network on freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd show user info">freebsd show user info</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd memory info">freebsd memory info</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd memory hardware information">freebsd memory hardware information</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd hw cbb start_memory windows">freebsd hw cbb start_memory windows</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="freebsd getsysinfo">freebsd getsysinfo</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-display-information-about-the-system-hardware.html" title="finding the system hardware freebsd kernel">finding the system hardware freebsd kernel</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="freebsd difference between reboot and shutdown -r">freebsd difference between reboot and shutdown -r</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-init-to-reboot-or-shutdown-system.html" title="freebsd reboot">freebsd reboot</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="EOF in centos">EOF in centos</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="freebsd / linux: sending a message to windows workstation with smbclient command">freebsd / linux: sending a message to windows workstation with smbclient command</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-linux-sending-a-message-to-windows-workstation-with-smbclient-command.html" title="freebsd send message to workstation">freebsd send message to workstation</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 command send network message">linux command 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="messages linux windows">messages linux 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="samba server">samba 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 to wondows">smbclient send message to wondows</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>
		<item>
		<title>FreeBSD &gt; Becoming super user (su) or enabling su access to user</title>
		<link>http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html</link>
		<comments>http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:45:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Press]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[vivek]]></category>
		<category><![CDATA[wheel]]></category>
		<category><![CDATA[wheel group]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1715</guid>
		<description><![CDATA[The superuser is a privileged user with unrestricted access to all files and commands. The superuser has the special UID (user ID) 0. You need to become super user (root) only when tasks need root permissions. Here is how to become super user: 1) At shell prompt type su and press enter key, when prompted [...]]]></description>
			<content:encoded><![CDATA[<p>The superuser is a privileged user with unrestricted access to all files and commands. The superuser has the special UID (user ID) 0. You need to become super user (root) only when tasks need root permissions. Here is how to become super user:</p>
<p>1) At shell prompt type su and press enter key, when prompted for password supply root user password:<br />
<code>$ su</code><br />
<em>password:<br />
#</em></p>
<p>2) To exit super user status type exit or press CTRL+D<br />
<code># exit</code>&gt;<br />
<em>$</em></p>
<p>Please note that if you get an error su: Sorry for normal user account. Following workaround needed to get rid of this problem/error:</p>
<p>1) For security, reason FreeBSD only allows su to root user, if user is member of wheel group. Wheel group is a special group for administration purpose. Add your normal user to this group using pw command using following:<br />
<strong># pw user mod username -G wheel </strong></p>
<p>2) So to add user vivek to group wheel run command as follows:<br />
<code># pw user mod vivek -G wheel<br />
# groups vivek</code><br />
<em>vivek wheel</em></p>
<p>3) Now su will work for vivek user.</p>
<p>You can disable this behavior complete for all users (not recommended until and unless you trust ALL of users):<br />
1) Open pam configuration file for su using text editor:<br />
<code># vi /etc/pam.d/su</code></p>
<p>2) Look for following line and comment it out:<br />
Line:<br />
<code>auth requisite pam_wheel.so no_warn auth_as_self noroot_ok exempt_if_empty</code><br />
Replace with:<br />
<code>#auth requisite pam_wheel.so no_warn auth_as_self noroot_ok exempt_if_empty</code></p>
<p>3) Now all users can use su command.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="freebsd pwd user mod wheel">freebsd pwd user mod wheel</a> (2)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="/etc/pam d/su in freebsd">/etc/pam d/su in freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="become super user freebsd">become super user freebsd</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="freebsd become super user">freebsd become super user</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="freebsd su sorry">freebsd su sorry</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="freebsd su sorry wheel">freebsd su sorry wheel</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="pam_wheel root_only">pam_wheel root_only</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.html" title="pw usermod wheel admin">pw usermod wheel admin</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/freebsd-becoming-super-user-su-or-enabling-su-access-to-user.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-02-07 10:58:14 -->
