0000:01:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
See also:
Hardware
FreeBSD locking an account
The pw utility is a command-line utility for the FreeBSD system user and group files. It allows the superuser an easy to use and standardized way of adding, modifying and removing users and groups. The same utility provides ability to locking or unlocking FreeBSD user accounts.
FreeBSD locking an account command
Syntax: pw lock {username} Example
Lock user account named rick.
Login as a root user and type following command: # pw lock rick
FreeBSD unlocking an account command
Syntax: pw unlock {username} Example
Unlock user account named rick.
Login as the root user and type the following command: # pw unlock rick
See also:
FreeBSD: Finding passwordless (no password) account and lock all accounts

Linux locking an account
passwd command is used to change user or group accounts password. A normal user may only change the password for his/her own account, the super user (root) may change the password for any account. You can use passwd command for locking or unlocking an account.
Linux locking an account
Syntax: passwd -l {username} Lock the account. This option disables an account by changing the password to a value which matches no possible encrypted value. Example: Lock user account named rick. Login as a root user and type following command:
# passwd -l rick
Linux unlocking an account
Syntax: passwd -u {username} Unlock the account. This option re-enables an account by changing the password back to its previous value i.e. to value before using -l option. Example: Unlock user account named rick. Login as a root user and type following command: # passwd -u rick See also: Search for all account without password and lock them [1] (includes sample script for FreeBSD/Linux/Sun Solaris)

How can I find out if my Ethernet card (NIC) is being recognized or not?
Ethernet card is lifeline of any Linux server. So if you need to find out find out if your Ethernet card is being recognized or not then use dmesg, ifconfig, or netstat command. Command ifconfig can be use to configure a network interface card as well as to find out information about Ethernet card. If you want find out NIC Ethernet chip set then you can use lspci command (see below for an example [1] of lspci). # /sbin/ifconfig Output: eth0 Link encap:Ethernet HWaddr 00:0F:EA:91:04:07 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20f:eaff:fe91:407/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:64874 errors:0 dropped:0 overruns:0 frame:0 TX packets:65189 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:50448703 (48.1 MiB) TX bytes:13648924 (13.0 MiB) Interrupt:18 Base address:0xc000 Note If you get output eth0 then your card is being recognized. The dmesg program helps users to print out their bootup messages. Messages are stored in /var/log/dmesg (Debian Linux): # cat /var/log/dmesg |grep -i eth0 Output: eth0: RealTek RTL8139 at 0xc000, 00:0f:ea:91:04:07, IRQ 18 eth0: Identified 8139 chip type 'RTL-8100B/8139D' eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 OR # dmesg | grep -i eth0 Display a table of all network interfaces: # netstat -i Output: Iface MTU eth0 1500 eth0: 1500 lo 16436 Met 0 0 0 RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg 64858 0 0 0 65172 0 0 0 BMRU - no statistics available BMRU 8133 0 0 0 8133 0 0 0 LRU
Find out NIC chipset For further troubleshooting of your Ethernet card (NIC) I recommend to use lspci command. lspci is a utility for displaying information about all PCI buses in the system and all devices connected to them. lspci | less OR
Table Of Contents
lspci | grep Ethernet Output:
In above example I have "Realtek Semiconductor" NIC with RTL-8139/8139C/8139C chip set.

Howto: Prevent root user from being able to log in via SSH service
Securing root account is one of the main tasks. Most systems have a password assigned to the root account. The first thing you do is assume that the password is always compromised. This does not mean that you should remove the password. The password is almost always necessary for console access to the machine. What it does mean is that you should not make it possible to use the password outside of the console. Direct root logins should only be allowed via the system console. 1) Login as a root user 2) Open /etc/ssh/sshd_config file # vi /etc/ssh/sshd_config 3) Make changes to ssh server configuration find the following line or edit the line from: PermitRootLogin yes Change it to: PermitRootLogin no 4) Save the changes 5) Restart sshd service # /etc/init.d/sshd restart The option PermitRootLogin specifies whether root can log in using ssh.

Why is it possible to create symbolic links across file system boundaries?
Symbolic links link by pathname rather than inode number. As you know, each pathname is a unique file on a system. Because of this, it is possible to create symbolic links across file system boundaries. Try to create symbolic links using following command: $ touch /home/you/file1 # ln -s /home/you/file1 /tmp/file2 Find out inode of both file1 and file2 # ls -i /home/you/file1 1567789 # ls -i /tmp/file2 1567795 As you can see inode number are unique to each file. So it is possible to create symbolic links across file system boundaries. Please note that in above example both /tmp and /home are two different file systems. See also: Why isn't it possible to create hard links across file system boundaries? [1]

What is a rootkits?
A rootkit is a: Set of software tools Used by a an intruder Installed by an intruder after gaining access to a computer system They hides: Logins Other processes Files, and logs etc from user Rootkits exist for a variety of operating systems such as Linux, Solaris and versions of Microsoft Windows. A computer with a rootkit on it is called a rooted computer.

How do I find out the MAC address of my Linux or FreeBSD system?
Q. Can you tell me how can I find out MAC address under Linux or FreeBSD server?
A. A mac address is acronym for media access control address, is a unique address assigned to almost all-networking hardware such as Ethernet cards, router etc. Most layer 2 network protocols use one of three numbering spaces managed by the IEEE: MAC-48, EUI-48, and EUI-64, which are designed to be globally unique. (see mac address [2] at wikipedia for more information). Following command work with Linux and other UNIX oses:
[1]
ifconfig command
Ifconfig is used to configure the kernel-resident network interfaces. In order to find out MAC address of system you can use ifconfig command as follows: $ /sbin/ifconfig | grep HWaddr Output: eth0 OR $ /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:0F:EA:91:04:07 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20f:eaff:fe91:407/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:60400 errors:0 dropped:0 overruns:0 frame:0 TX packets:109216 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:69273219 (66.0 MiB) TX bytes:14285799 (13.6 MiB) Interrupt:18 Base address:0xc000 Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3869 errors:0 dropped:0 overruns:0 frame:0 TX packets:3869 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:396498 (387.2 KiB) TX bytes:396498 (387.2 KiB) Link encap:Ethernet HWaddr 00:0F:EA:91:04:07
lo
OR as a root user type following command: # grep eth0 /var/log/dmesg eth0: RealTek RTL8139 at 0xc000, 00:0f:ea:91:04:07, IRQ 18 eth0: Identified 8139 chip type 'RTL-8100B/8139D' eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
FreeBSD example FreeBSD example
# ifconfig Output: lnc0: flags=108843 mtu 1500 inet 74.xx.yy.zzz netmask 0xfffffff0 broadcast 74.xx.yyy.zzz ether 00:0c:29:b8:92:8b plip0: flags=108810 mtu 1500 lo0: flags=8049 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000
Iptables mac address based filtering [3]

Do I need antivirus software for linux?
To be frank there is no serious viruses found so far for Linux. The main reason is Linux is quite secure as compare to Windows. Also, viruses cannot cause any serious damage if they are not activated by root user (that is why you need to use su or sudo command and always login as normal user). However if you are using any one of the following program then consider getting a good virus scanner: 1. Windows via Samba 2. Linux Email server 3. Linux as a router etc Most are windows virus that, may affects above program. See also: Free Antivirus for Linux Desktop available for download [1]

How To Use SSH in Unix or Linux shell script
Q. How do I use ssh client program in a shell script under UNIX or Linux operating system?
A. SSH client is a program for logging into a remote machine and for executing commands on a remote machine. ssh connects and logs into the specified hostname.The user must prove his/her identity to the remote machine using one of several methods depending on the protocol version used. If command is specified, command is executed on the remote host instead of a login shell.
SSH general syntax
ssh user@hostname command For example login into remote system called portal.nixcraft.com and find out who logged in, enter: $ ssh admin@portal.nixcraft.com who
[1]
You can use same command in shell script. However, it will prompt for a password. To avoid password prompt you need to ssh keys based login as specified in our article [2] for password less login. Next, you can create a sample shell script as follows: $ vi sshscript.sh Type the following shell script lines: #!/bin/bash # Linux/UNIX box with ssh key based login enabled SERVER="192.168.1.1" # SSH User name USR="admin" OUT="out.txt" ssh $USR@$host w > $OUT Save and close the file. Type the following command to execute the script: $ chmod +x sshscript.sh $ ./sshscript.sh You can see output of script with cat command: $ cat out.txt See more complex example in our shell script directory [3].