Secured by Comodo InstantSSL

ServerFlux – Securing the Internet

Server Administration, Internet Security and Tutorials

How to use Subversion (SVN) from Command Line

Forenote: This article needs to be revised and may be incomplete, please take care when following it.

Firstly we will create a folder for our SVN Base Dir:

mkdir /SVN
cd /SVN

Now we will create a repostitory:

svnadmin create --fs-type fsfs /SVN/MyRepositoryName

We can now import a typical template (or existing project) – for example:

mkdir /tmp/template
cd /tmp/template
mkdir trunk
mkdir branches
mkdir tags

Definitions:
Trunk:- Usually reperesents the mainstream development
Branches:- Usually reperesents experimental or new concept code
Tags:- Used to mark specific revisions e.g. version 1 or version 2

and then import them into our repository we created:

-need to add someting here-

To checkout a repositroy use:

svn co file:///SVN/MyRepositoryName tmp

“tmp” is the directroy where the downloaded files will be stored from the repostiroy and this will also be your SVN working directory.

We can now connect to our repository over SSH, to list the file within our repository remotely issue:
svn ls svn+ssh://username@remotehost.com/SVN/MyRepositoryName

or to “CheckOut” the repository we can issue the following command:

svn co svn+ssh://root@localhost/SVN/trunk myproject

Note: The “myproject” part of the command simply defines where checkout will be stored.

Definition – Checkout: This simply means to retrieve a specific copy of the repostiroy or part there of.

We can also directly import files into the repository:

svn import test.htm file:///SVN/trunk/test.htm --message "what / why I am doing this"

The above would simply import test.htm (from the current directory) and place it within /SVN/trunk/ in the repository.

or remotely:

svn import test.htm svn+ssh://username@remotehost.com/SVN/trunk/test.htm --message "what / why I am doing this"

You can also check the status of file within the directroy to see if they have been revised / are up to date:

svn status --verbose

and

svn diff

And to find out information about the SVN directory we use:

svn info

.

In order to add files we use:

svn add examplefile.html

and we then commit the changes:

svn commit -m "byebye"
 

How to use Git Command Line on Windows

You can firstly download the git installer for windows below:

https://code.google.com/p/msysgit/downloads/list?can=3

Creating a local repository:

We will firstly create a base for our repositroy:

mkdir C:\repository

We must then open up the Git bash console and CD to our directory, although bare in mind back slashes become foward slashes under Bash or rather the file system.

cd C:/repository

and initialize Git in the directory:

git init

and then designate an upstream server:

git remote add https://monitorflux@bitbucket.org/monitorflux/monitorflux.git

We can then add files to our local repostory e.g. create a file named test.txt within C:\repository and add the file:

git add test.txt

or we could add all files within our local repository – using a wildcard e.g.:

git add *

We can use “git commit” to commit changes made to a local repositroy i.e. on your own computer

git commit -am 'initial commit'

or if the Git repository is hosted remotely e.g. GitHub, you would use the “git push” command e.g.:

git push https://yourusername@bitbucket.org/projectname/project.git master

Close a Repsotiroy:

To clone a repository we will firstly make a new directory:

mkdir C:/cloned_repository
cd C:/cloned_repository

and then issue the following command to clone:

git clone https://yourusername@yourhost.org/yourproject/projectname.git

Now we can modify files for committing by issuing the git add or git delete commands e.g.

git delete Home.aspx

or

git add NewFile.aspx

Suppose we had modified an existing file called Home.aspx, since this file has already been indexed within Git and our repository we can simply issue:

git push https://yourusername@bitbucket.org/projectname/project.git master

or

git commit -am 'initial commit'

Although if we added a file called Test.aspx we would need Git to add / index it, so it is aware of the new file e.g.

git add Test.aspx 

or we can use wildcards (in this case add everything!):

git add *

and finally we can retrieve changes by using:

git pull

These are really the core commands to Git, there is a lot more to Git than meets the eye, for further reading I would reccomend looking here:

http://help.github.com/git-cheat-sheets/
 

How to Setup Lighttpd, MYSQL and PHP5 on Debian Squeeze

This tutorial will show you how to quickly deploy a server running, lighttpd, mysql and php5.

Step 1: Installing lighttpd:

apt-get install lighttpd

Step 2: Installing MYSQL:

apt-get install mysql-server mysql-client

Step 3: Installing and configuring PHP5:

apt-get install php5-cgi php5-mysql 

We will edit the php.ini file:

nano /etc/php5/cgi/php.ini

and find the line “cgi.fix_pathinfo=” (or add it) and append it as follows:

cgi.fix_pathinfo=1

Step 4: Configure Lighttpd (enable modules):

lighttpd-enable-mod fastcgi
lighttpd-enable-mod fastcgi-php

and create the configuration file for PHP5:

cp /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/10-fastcgi.conf

and finally reload lighttpd:

/etc/init.d/lighttpd force-reload
 

Create a USB Installation of Windows from Linux

The situation arose the other day where I was faced with the situation of not having access to a windows box. All I had at my disposable was a Debian box. This tutorial will show you how to create a USB installation of MSDOS – up until Windows 7.

Firstly you will need to a USB pen (for Windows 7, you should have a pen sizing 4GB or above) and you should format it using FAT32 (for older versions of Windows) or NTFS (for newer versions e.g. XP, Vista, 7 etc.).

Once the drive has been formatted, we will need access to a disc image (iso) of the operating system or alternatively a CD / DVD. Copy all the contents of the root of the CD onto the root of the USB Drive. For example in Linux:

cp /mount/cdrom/* /mount/usbdrive

Now we need to write a MBR to the USB Drive, in this tutorial we will use a utility called “ms-sys”:

 cd /tmp
wget http://downloads.sourceforge.net/project/ms-sys/ms-sys%20stable/2.2.1/ms-sys-2.2.1.tar.gz?r=http%3A%2F%2Fms-sys.sourceforge.net%2F&ts=1323440650&use_mirror=netcologne -o ms-sys-2.2.1.tar.gz
tar zxvf ms-sys-2.2.1.tar.gz
cd ms-sys-2.2.1
make
make install

We will now use the utiltiy to write the Windows 7 MBR to the USB Drive:

ms-sys -7 /dev/usbdrive

This should take a few seconds and upon finishing, restart your PC (make sure you enable USB boot within your BIOS and change the boot priority accordingly) and the Windows 7 setup should start! :)

As mentioned earlier in the tutorial, this can be applied to various different Microsoft operating systems, see below for a full list of supported OS’s:

Usage:
	ms-sys [options] [device]
Options:
    -1, --fat12     Write a FAT12 floppy boot record to device
    -2, --fat32nt   Write a FAT32 partition NT boot record to device
    -3, --fat32     Write a FAT32 partition DOS boot record to device
    -4, --fat32free Write a FAT32 partition FreeDOS boot record to device
    -5, --fat16free Write a FAT16 partition FreeDOS boot record to device
    -6, --fat16     Write a FAT16 partition DOS boot record to device
    -l, --wipelabel Reset partition disk label in boot record
    -p, --partition Write partition info (hidden sectors, heads and drive id)
                    to boot record
    -H, --heads  Manually set number of heads if partition info is written
    -7, --mbr7      Write a Windows 7 MBR to device
    -i, --mbrvista  Write a Windows Vista MBR to device
    -m, --mbr       Write a Windows 2000/XP/2003 MBR to device
    -9, --mbr95b    Write a Windows 95B/98/98SE/ME MBR to device
    -d, --mbrdos    Write a DOS/Windows NT MBR to device
    -s, --mbrsyslinux    Write a public domain syslinux MBR to device
    -z, --mbrzero   Write an empty (zeroed) MBR to device
    -f, --force     Force writing of boot record
    -h, --help      Display this help and exit
    -v, --version   Show program version
    -w, --write     Write automatically selected boot record to device

    Default         Inspect current boot record

Warning: Writing the wrong kind of boot record to a device might
destroy partition information or file system!
 

Send email from command-line using a remote SMTP server

This tutorial shows you how to configure your machine to send emails using a remote SMTP server, in the case of this tutorial we will use gmail’s SMTP server.

We will start by installing and configuring sSMTP:

cd /tmp
wget http://ftp.us.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.64-4_amd64.deb
dpkg -i ssmtp_*

We will also require the “mailutils” package (available by default on the majority of distro’s) but it wasn’t on mine, so we do:

apt-get install mailutils

Now we will configure the remote mail server settings:

nano /etc/ssmtp/ssmtp.conf

Example Configuration:

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail

# Where will the mail seem to come from?
#rewriteDomain=

# The full hostname
hostname=myhostname

AuthUser=myusername@gmail.com
AuthPass=mypassword
FromLineOverride=YES
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES

It is also important to make sure that no other MTA’s are running, for example postifx, sendmail etc., you can do a quick check as follows:

netstat -tuna | grep 25

We can now send a test email in the following format:

echo "<subject>" | mail -s "<message>" <email-address>

e.g.

echo "My Subject" | mail -s "Hellow World!" myname@gmail.com

If you encounter any problems or are not receiving emails, re-check your configuration (I think Gmail requires you to enable SMTP access externally – I maybe wrong though.) and you can check the mail queue by using:

mailq

and debug problems by checking /var/log/mail.error or /var/log/mail.log

 

Install Mono & Mono Develop on Debian Squeeze

We will firstly need to install monodevelop and its dependencies:

apt-get install bison build-essential libpango1.0-dev libgnome2.24-cil gnome-sharp2 git libtool
wget http://ftp.uk.debian.org/debian/pool/main/g/gtk-sharp2/gtk-sharp2_2.12.10-1_all.deb
dpkg -i gtk-sharp2_2.12.10-1_all.deb
apt-get -f install
wget http://serverflux.com/wp-content/plugins/download-monitor/download.php?id=25 -o mono-addins-0.6.zip
unzip mono-addins-0.6.zip
cd mono-addins-0.6.0
./configure; make; make install

We need to install GTK-Sharp and its dependencies:

Libffi

wget ftp://sourceware.org/pub/libffi/libffi-3.0.10.tar.gz
tar zxvf libffi-3.0.10.tar.gz
cd libffi-3.0.10
./configure
make
make install

Glib

wget http://ftp.gnome.org/pub/gnome/sources/glib/2.30/glib-2.30.1.tar.bz2
tar xvf glib-2.30.1.tar.bz2
cd glib-2.30.1
./configure
make
make install

GTK+

wget http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.8.tar.bz2
tar xvf gtk+-2.24.8.tar.bz2
cd gtk+-2.24.8.tar.bz2
./configure
make
make install

GTK#

git clone http://github.com/mono/gtk-sharp.git gtk-sharp-2-12-branch
cd gtk-sharp-2-12-branch
sh autogen.sh

And also the GNOME-SHARP package and it’s dependencies:

git clone http://github.com/mono/gnome-sharp.git master
cd master
./bootstrap-2.24
make
make install
cd ../
rm -R master
git clone http://github.com/mono/gnome-desktop-sharp.git master
cd master
sh autogen.sh

MonoDevelop Installation
Unfortunately installing the latest version from source led to a silly amount of errors and hence required a good number of tweaks and dependencies – which by this time I had; had enough, so instead we will simply download the deb:

wget http://ftp.us.debian.org/debian/pool/main/m/monodevelop/monodevelop_2.4+dfsg-3_all.deb
dpkg -i monodevelop_2.4+dfsg-3_all.deb
apt-get -f install

Mono Installation

wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.10.2.tar.bz2
tar xvf mono-2.10.2.tar.bz2
cd mono-2.10.2
./configure --prefix=/usr/local; make; make install

To start mono develop:

export MONO_GAC_PREFIX=/usr/local:/usr
monodevelop
 

Adding the RPMForge Repository in CentOS 4 / 5 / 6

We will firstly need to add the RPMForge public key, so YUM doesn’t wine about the validity of the source:

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

and then install the RPMForge package, that simply adds RPMForge’s sources to YUM:

CentOS 4 x86:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.i386.rpm
yum install rpmforge-release-0.5.2-2.el4.rf.i386.rpm

CentOS 4 x64:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm
yum install rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm

CentOS 5 x86:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
yum install rpmforge-release-0.5.2-2.el5.rf.i386.rpm

CentOS 5 x64:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
yum install rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

CentOS 6 x86:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
yum install rpmforge-release-0.5.2-2.el6.rf.i686.rpm

CentOS6 x64:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
yum install rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

You can now search the RPMForge repository or use:

yum search <packagename>

to search the repository.

 

Installing Snorby, Barnyard and Snort on Debain Squeeze

Fornote: It is important that you use the latest version of Snort, since older versions (including the current versions in Debian’s repository – I found out the hard way!) Do not support unified2 log file format – which is essential for this tutorial.

The following tutotial is based from the following articles:

http://www.snort.org/assets/167/deb_snort_howto.pdf

http://www.corelan.be/index.php/2011/02/27/cheat-sheet-installing-snorby-2-2-with-apache2-and-suricata-with-barnyard2-on-ubuntu-10-x/

Step 1: Installing Snort

We will firstly install the required prerequisites:

apt-get install build-essential default-jre unzip ruby1.9.1 ruby1.9.1-dev build-essential libxslt1-dev libpng12-dev libjpeg62-dev ttf-dejavu libtiff4-dev libjasper-dev libfontconfig1-dev libxml2-dev ghostscript libopenexr-dev libwmf-dev librsvg2-dev libfftw3-dev liblzma-dev liblcms1-dev graphviz-dev libdjvulibre-dev openssl xorg libssl-dev mysql-server mysql-client libmysqlclient-dev flex bison libpcre3-de

Install libpcap:

cd /usr/src
wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
tar -zxf  libpcap-1.1.1.tar.gz && cd libpcap-1.1.1
./configure --prefix=/usr --enable-shared
make && make install 

Install libdnet:

cd /usr/src
wget http://libdnet.googlecode.com/files/libdnet-1.12.tgz
tar -zxf libdnet-1.12.tgz && cd libdnet-1.12
./configure --prefix=/usr --enable-shared
make && make install 

Install DAQ:

cd /usr/src
wget http://www.snort.org/dl/snort-current/daq-0.5.tar.gz
tar -zxf daq-0.5.tar.gz && cd daq-0.5 

DAQ needs to be patched to properly recognize the buffer_size parameter.

nano /usr/src/daq-0.5/os-daq-modules/daq_pcap.c 

on line 219 replace:

context->buffer_size = strtol(entry->key, NULL, 10); 

with:

context->buffer_size = strtol(entry->value, NULL, 10);

Now run:

./configure
make && make install 

Update the shared library path

echo >> /etc/ld.so.conf /usr/lib && ldconfig 

Now we will compile and install Snort:

cd /usr/src
wget http://www.snort.org/dl/snort-current/snort-2.9.0.5.tar.gz -O snort-2.9.0.5.tar.gz
tar -zxf snort-2.9.0.5.tar.gz && cd snort-2.9.0.5
./configure --with-mysql --enable-dynamicplugin --enable-perfprofiling --enable-ipv6 --enable-zlib --enable-reload
make && make install 

And create directories and set permissions that we will need for out setup:

mkdir /etc/snort /etc/snort/rules /var/log/snort /var/log/barnyard2 /usr/local/lib/snort_dynamicrules
groupadd snort && useradd -g snort snort
chown snort:snort /var/log/snort /var/log/barnyard2
cp /usr/src/snort-2.9.0.5/etc/*.conf* /etc/snort
cp /usr/src/snort-2.9.0.5/etc/*.map /etc/snort 

We are now required to change some settings in the snort conf:

nano /etc/snort/snort.conf

Change the following lines:

Line #39 - ipvar HOME_NET 192.168.1.0/24 – make this match your internal (friendly) network
Line #42 - ipvar EXTERNAL_NET !$HOME_NET
Line #80 - var RULE_PATH ./rules – this assumes /etc/snort/rules
Line #186-#190 comment out all of the preprocessor normalize_ lines
Line #366 - add this: output unified2: filename snort.log, limit 128
Line #395 - delete or comment out all of the “include $RULE_PATH” lines except “local.rules”

And we will create a simple rule:

nano /etc/snort/rules/local.rules 

Enter a simple rule like this for testing:

alert icmp any any -> !$HOME_NET any (msg:"ICMP test"; sid:10000001;) 

Now we can start and test snort.

/usr/local/bin/snort -A console -q -u snort -g snort -c /etc/snort/snort.conf -i eth0

Then ping the external interface from another machine and you should see something like the following:

02/09-11:29:43.450236  [**] [1:10000001:0] ICMP test [**] [Priority: 0] {ICMP} 172.5.5.1 -> 172.5.5.2
02/09-11:29:43.450251  [**] [1:10000001:0] ICMP test [**] [Priority: 0] {ICMP} 172.5.5.2 -> 172.5.5.1  

Step 2: Installing Snorby

We will install the prerequisites:

apt-get install gcc g++ build-essential libssl-dev libreadline5-dev zlib1g-dev linux-headers-generic libsqlite3-dev libxslt-dev libxml2-dev imagemagick git-core libmysqlclient-dev mysql-server libmagickwand-dev

Install WKHTMLTOPDF:

cd /tmp
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2
bunzip2 wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2
tar xvf wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2
cp wkhtmltopdf-i386 /usr/bin/wkhtmltopdf

Install Ruby:

cd /tmp
wget http://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
tar -xvzf ruby-1.9.2-p0.tar.gz
cd ruby-1.9.2-p0
./configure
make && make install
ln -s /usr/local/ruby/bin/bundle /usr/bin

Install the required gems:

gem install thor i18n bundler
gem install tzinfo builder memcache-client rack rack-test erubis mail text-format
gem install rack-mount --version=0.4.0
gem install rails sqlite3-ruby

And download the latest version of Snorby using git:

git clone http://github.com/Snorby/snorby.git /usr/local/snorby

Snorby Configuration:

nano /usr/local/snorby/config/database.yml
adapter: mysql
  username: root
  password: "your_password"
  host: localhost

NOTE: Make sure you that you use the root account – WHY you ask? Simply put Snorby creates the database, rather than yourself, so you will need to use the root account or a mysql user that has access to control all databases. After the installer script has created the database you can create a limited mysql user – as you will see later on in the tutorial.

We will continue by editing the main conf:

/usr/local/snorby/config/snorby_config.yml

Add / change the variables in this file as follows, although leave any additional variables already in the file!:

development:
  domain: localhost:3000
  wkhtmltopdf: /usr/bin/wkhtmltopdf

test:
  domain: localhost:3000
  wkhtmltopdf: /usr/bin/wkhtmltopdf

production:
  domain: localhost:3000
  wkhtmltopdf: /usr/bin/wkhtmltopdf

We will now start the prepare for running the installer script:

cd /usr/local/snorby
gem install arel
gem install ezprint
bundle install

Before we run the setup we need to patch the rake file from:

require File.expand_path('../config/application', __FILE__)
require 'rake'
include Rake::DSL if defined?(Rake::DSL)

Snorby::Application.load_tasks

to:

require File.expand_path('../config/application', __FILE__)
require 'rake/dsl_definition'
require 'rake'

Snorby::Application.load_tasks

Launch the Snorby setup:

rake snorby:setup

If you get an error as follows e.g.:

You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2.

You can do the following:

gem uninstall rake 0.9.2.2 # Uninstall version 0.9.9.2
gem install rake -v='0.9.2' # Install the correct version - 0.9.2

An output similar to the following should be presented:

[datamapper] Created database 'snorby'
[datamapper] Finished auto_upgrade! for :default repository 'snorby'

We can now create a mysql user specifically for snorby:

mysql -u root -p
create user 'snorby'@'localhost' IDENTIFIED BY 'your_password';
grant all privileges on snorby.* to 'snorby'@'localhost' with grant option;
flush privileges;

Now we can edit the snorby database config again and replace the mysql root credentials we entered with our new user:

nano /usr/local/snorby/config/database.yml
adapter: mysql
  username: snorby
  password: "your_password"
  host: localhost

Finally we can run the Snorby server:

rails server -e test

You can now go to the server in your web browser:

http://<your-ip-or-hostname>:3000

Default login:
Username:

snorby@snorby.org

Password:

snorby

Upon logging in you should be presented with the user dashboard, although you will notice on the top right of the screen you will see a message complaining that the “Snorby worker” has not been started – as seen below:

Go to Administration > General > Worker Options > Start Worker

It might take a minute or so to start the worker, when it has started you should be presented with the following screen:
Snorby worker has started

We will lastly setup Barnyard – that simply put pareses Snort’s log output and dumps it to a database. In our case it will be dumping it in Snorby’s database.

Step 3: Installing Barnyard2

cd /usr/src
wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz
tar -zxf barnyard2-1.9.tar.gz && cd barnyard2-1.9
./configure --with-mysql
make && make install
mv /usr/local/etc/barnyard2.conf /etc/snort 

We need to also make a few minor tweaks to the barnyard conf file:

nano /etc/snort/barnyard2.conf 

Change Line #215 to:

output alert_fast 

and add the following line at the end of the file (modify as appropriate):

output database: log, mysql, user=snorby password=<your_password> dbname=snorby host=localhost sensor_name=sensor1

And finally we will start snort and barnyard2 using the following (make sure no existing instances are running!):

/usr/local/bin/snort -q -u snort -g snort -c /etc/snort/snort.conf -i eth0 & /usr/local/bin/barnyard2 -c /etc/snort/barnyard2.conf -d /var/log/snort -f snort.log -w /etc/snort/bylog.waldo -G /etc/snort/gen-msg.map -S /etc/snort/sid-msg.map -C /etc/snort/classification.config & 

Now launch Snorby (if its not already running!):

cd cd /usr/local/snorby
rails server -e test

Send some pings to the external interface and then check Snorby’s web interface:

http://<your-ip-or-hostname>:3000

Login, clock on the Sensors tab and you should see the sensor is visible and events being recorded as follows:

If events don’t seem to be being displayed on Snorby, you can check the “snorby” database to make sure that barnyard2 is dumping them in the events table properly by doing:

mysql -uroot -p -D snorby -e "select count(*) from event"
 

Install AVIRA Professional Security (Unix) on Debian Squeeze

AVIRA workstation for Unix requires a few dependancies that are that mentioned in the install guide.

Firstly we will install these:

apt-get install build-essential ia32-libs linux-headers-2.6.32-5-amd64

Now we can download the installation file:

cd /tmp
wget http://dlpro.antivir.com/package/wks_avira/unix/en/prof/antivir-workstation-prof.tar.gz

And then unpack and start the install script:

tar zxvf antivir-workstation-prof.tar.gz
cd antivir-workstation*
./install

The install script should then load up and not throw any error messages! :)

 

Mounting CD / DVD ROM’s in Linux

Mounting cd / dvd rom’s in Linux is best done using the CLI.

Optical drives are usually one of SATA, IDE or SCSI – hence we will have to locate the device in /dev:

ls /dev

A typical example of a CD-ROM drive might be SDA1 or SG0.

In order to mount the device we issue:

mount -t auto /dev/sda1 /mnt/cdrom

* Notice the “-t auto” switch instructs “mount” to attempt to automatically identify the file system.

“/dev/sda1″ is reffering to the device, will /mnt/cdrom is reffering to the mount point.