Superb Mini Server Documentation: Written By: Gerasimos - H
Superb Mini Server Documentation: Written By: Gerasimos - H
Documentation
1. Requirements
SMS.Native.CD requirements:
Any Pentium class processor 500MHz or AMD K2 and above will do, as for the RAM you will need at least
128MB (256MB recommended). You can install it on a 486 machine with 128MB RAM too, but you need to
choose huge or hugel7 kernel while booting SMS install disk.
SMS.Live.CD requirements:
To boot into Live mode any Pentium class processor 500MHz or AMD K2 and above will do, as for the RAM
you will need at least 128MB (256MB recommended). Booting in a slow computer with 128MB might output
error with clamav-milter (needs to increase the time for loading), after you install it on disk there will be no
such problem.
2. Installation
2.1 SMS.Live.CD Installation:
Boot with SMS.LiveCD, login with username: root and password: toor, type sms-text-installer and follow
the instructions. After the sms-text-installer finishes, reboot and use netconfig command to configure your
servers hostname and domain.
Note: Installing SMS from SMS.LiveCD is NOT recommended.
2.2 SMS.Native.CD Installation:
2.2.1 Choose Kernel
- At boot promt select your kernel from a choice of four kernels and press enter:
1. hugesmp.s Default SMS Kernel very similar to Slackwares kernel.
2. huge.s Default SMS Kernel for i486 and better machines.
3. hugel7.s Same as hugev.s but with Layer 7 support patch.
4. memtest Test your memory for errors with memtest utility.
Page 2
Page 3
Page 4
Network
configuration
will
use
netconfig script to alter your servers
configuration to your new hostname
& domain, including dovecot, postfix,
httpd, sasl, squirrelmail, phpldapadmin
except openldap. To be able to configure
openldap, /usr/libexec/slapd must be
running, so either you configure your
system and on first boot you import
sms.ldif with the command
ldapadd -f /etc/openldap/sms.ldif -x -D cn=Manager,dc=yourhostname,dc=yourdomain -w toor
or skip network configuration and upon reboot use netconfig-lcd to configure your <hostname.domain>.
Continue with the installer, selecting services that start at boot, custom screen fonts, time zone setup, default
window manager for X and finally setting your root account password.
Exit the installer and reboot to your newly installed system.
Page 6
Linux
Linux
Linux swap
When its time to choose a kernel choose a generic one, since huge kernels complains with initrd images, although
they may work just fine.
When setup finish dont reboot your server, as lilo is not installed.
You need to chroot to your newly system
chroot /mnt
Page 7
Page 8
Page 9
Now that you unmounted home, navigate to Logical Volume Management and increase or decrease the partition
Page 10
Page 11
Page 12
Page 13
Page 14
3. Configuration
rootpw
{SSHA}CMsEaYBDv2oO0TVpeCr0cwQVfTBm8/pJ
Dont forget to change the password for ldap entries too (by default all are toor )
cn=Manager
cn=dovecot
cn=postfix
uid=administrator
To change passwords, login in phpldapadmin (http://<yourserver>/
phpldapadmin) and you should see
all the entries listed. Selecting one will show you info about
entry and a field named password.
Enter your new password and select its encryption from the
drop down list, for instance SSHA, and press the Update Object
button. It will ask you to confirm changes, press once again the
Update Object button for changes to apply.
Page 16
Page 17
sms-
Page 18
Page 19
Page 20
Page 21
Configuration Completed
Well you don't have to do anything here, unless you want to go back.
Just click finish and reboot your server.
Page 22
2. Next step the script ask you to change the password for user "administrator"
3. Next you will be asked to disable shell access to users (that is intended for old installations too).
+-------------------------------+
| Manage users login:
|
+-------------------------------+
spamduser
vmail
dovecot
administrator
Do you want to disable shell access to those users? (y/n):
4. The next screen ask you, how to treat default ftp accounts "ftpuser" and "webftp".
+-------------------------------+
| Manage ftp users:
|
+-------------------------------+
(Y)Change passwords (D)Delete all ftp users (S)Skip
Page 23
6. If MySQL is running the wizard ask you to manage MySQL users. The script search config files of weberp and
sqlgey and if default passwords found, it will prompt you to change those too.
+-------------------------------+
| Manage MySQL users:
|
+-------------------------------+
Enter new password for MySQL's root:
Choose password for database sqlgrey:
Choose password for database weberp:
7. Next the wizard prompt you to change default Webmin admin password.
+-------------------------------+
| Manage Webmin login:
|
+-------------------------------+
Choose password for admin user:
8. Next screen you have to choose what to do with web apps, weberp and torrentflux
+-------------------------------+
| Manage Web apps:
|
+-------------------------------+
Are you going to use Torrentflux? (y/n)
n
Are you going to use webERP? (y/n)
n
9. Next you have to manage samba network access, by default script search your subnet and apply it as default.
+-----------------------------------+
| Manage Samba network access:
|
+-----------------------------------+
Do you want to limit samba access to your network only [192.168.1.]? (y/n)
10. Well thats it, smsconfig secure is much simpler than sms_secure.kmdr GUI, but since you are already
using a terminal, you might not need that anyway.
+----------------------------------------------------+
|
Configuration completed
|
+----------------------------------------------------+
Page 24
The second way is Slackwares semi-automated way through xorgsetup command. Once you type xorgsetup
you will be guided through a few steps configuration windows.
Page 25
The third way is by typing xorgconfig, a menu driven frontend with more detailed configuration, but you
probably never need to run it. Once you finish with X config run startx to launch KDE.
Page 26
Page 27
Page 28
Page 29
So by adding boot parameter light in the above command line, will start a PXE boot server with all the services
disabled, and by additionally adding ssh will enable SSH server only.
Available boot parameters (cheatcodes)
nocd => Dont mount any cdroms at all during the boot process.
nohd => Dont mount any harddisks at all.
nodma => Disable DMA for all CD-ROMs and disks.
toram => Copy all files (all required and optional modules) to RAM.
copy2ram => Copy all files (all required and optional modules) to RAM.
light => Disable all services.
pxeboot => Enable PXE Boot Server.
clmaster => Enable Cluster master node.
luks => Support for LUKS encrypted volumes.
smb => Enable samba file server.
nosmb => Disable samba file server.
afp => Enable AFP server.
ssh => Enable sshd server.
nossh => Disable sshd server.
ftp => Enable FTP server.
noftp => Disable FTP server.
httpd => Enable httpd web server.
nohttpd => Disable httpd web server.
ldap => Enable OpenLDAP server.
noldap => Disable OpenLDAP server.
mysql => Enable MySQL server.
nomysql => Disable MySQL server.
cups => Enable Print server.
nocups => Disable Print server.
mail => Enable SMS Mail server.
nomail => Disable SMS Mail server.
fax => Enable Fax server (hylafax).
nofax => Disable Fax server (hylafax)
debug => Enable debug mode (and start bash several times during the boot) hit Ctrl+D to continue booting.
from=path => Load SMS data from different place instead of the boot device.(from=/dev/sda1/SMS.LiveCD.iso)
changes=/path/ => Tell SMS to use a device, a file or a directory for storing changes.
changes=/sms/smssave.dat
changes=/dev/sda2/file.dat
changes=/dev/sda3/
Page 30
Double click the sms_config shortcut on the Desktop to open SMS Config GUI tools.
Page 31
Page 32
Page 33
Page 34
Page 35
[options]
[services]
[options]
Asterisk PBX
Local network service discovery
Bind DNS server and utilities
ClamAV antivirus
CUPS print server
Web content filter
Light DNS and DHCP server
Dovecot IMAP/POP server
Bans IP that makes too many password failures
Radius protocol server
Apache HTTP server
Hylafax FAX server
Light, fast, and secure webserver
Antivirus and antispam filter
SQL-based relational database server
Nagios monitoring software
Appletalk file and print server
Network File System daemon
Nginx [engine x] (http/imap/pop3 proxy)
Network Time Protocol daemon
OpenLDAP server
Secure IP tunnel daemon
Postfix mail server
Object-relational database management system
FTP server
RTorrent torrent client
SMB file and print server
Simple Authentication and Security Layer
Mail transfer agent (by default disabled)
SMS by default use Postfix mail server
Perl e-mail filter to identify spam
Squid Web proxy server and web cache
SSHD Secure Shell daemon
Transmission-daemon torrent client
VNC server
Java servlet container
Mediatomb UPnP Media Server
Web based video surveillance solution
Varnish Cache, a web application accelerator
Very secure FTP Daemon
Webmin Management.
LDAP NSS/PAM module
Options:
start
stop
on
off
status, st
config, cf
Tools:
help, -help, --help
version, -V
info, sys
status, all, st
mysqlreset
webminreset
ldapreset
netconfig
router
inetd
secure
Page 36
PID(s)
]
]
]
]
]
]
]
[ 3569 ]
[ 3653 ]
[ 4145 ]
[ 4176 ]
[ 4165 4162 ]
[ 3668 3667 3666 3665 3663 ]
[ 4155 4159 4160 ]
[ 5478 3562 ]
]
]
Page 37
or vsftpd:
root@sms:~# smsconfig vsftpd
Usage: /sbin/smsconfig vsftpd [option]
Options:
start
stop
on
off
daemon
inetd
status, st
config, cf
Page 38
root@sms:~# smsconfig -V
smsconfig v0.4.2
SMS Version: SMS 2.0.1
Size
295M
246M
4.1G
7.9G
E5300
@ 2.60GHz
Page 39
1621
DNS servers are listed in /etc/resolv.conf. To manually add name servers edit /etc/resolv.conf and enter e.g.
nameserver 192.168.2.1
nameserver 208.67.222.222
nameserver 208.67.220.220
The same way you can add virtual network interfaces like
If you want virtual interfaces to automatically start at boot place an entry in /erc/rc.d/rc.local like:
Page 40
etc/
home/
lib/
mnt/
opt/
proc/
root/
sbin/
srv/
sys/
tmp/
usr/
var/
Directories get a slash at the end of the name, executable files get an asterisk at the end of the name, and so on.
ls can also be used to get other statistics on files. For example, to see the creation dates, owners, and permissions,
you would look at a long listing:
root@sms:~# ls -lh
total 4.0K
drwxr-xr-x 2
drwxr-xr-x 6
drwxr-xr-x 15
drwxr-xr-x 79
drwxr-xr-x 4
drwxr-xr-x 7
drwxr-xr-x 4
drwxr-xr-x 3
dr-xr-xr-x 116
drwx--x--- 6
drwxr-xr-x 2
drwxr-xr-x 2
drwxr-xr-x 13
drwxrwxrwt 5
drwxr-xr-x 27
drwxr-xr-x 36
/
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
2.6K Apr
4.0K Apr
5.3K Jun
300 Jun
47 Feb
60 Apr
80 Jun
74 Apr
0
Jun
139 Oct
4.4K May
39 Apr
0
Jun
100 Jun
80 Mar
200 Apr
23
27
19
19
28
25
19
23
19
6
12
8
19
19
25
25
16:18
20:39
13:35
13:35
06:03
14:03
2011
16:17
2011
1997
2010
2007
2011
13:35
12:29
14:03
bin/
boot/
dev/
etc/
home/
lib/
mnt/
opt/
proc/
root/
sbin/
srv/
sys/
tmp/
usr/
var/
Suppose you want to get a listing of the hidden files in a directory. This command will do just that:
root@sms:~# ls -a
./ ../ .bash_history
.cpan/
.gnupg/
.hplip.conf
.kde/
.rnd
.spamassassin/
Files beginning with a period (called dot files) are hidden when you run ls.
You will only see them if you pass the -a option. There are many more options that can be found in the manual
page. Dont forget that you can combine options that you pass to ls.
5.3.2 cd
The cd command is used to change working directories. You simply type cd followed by the path name to change
to. Here are some examples:
root@sms:/# cd /var/smb/
root@sms:/var/smb# cd smb
-bash: cd: smb: No such file or directory
root@sms:/var/smb# ls
samba/ tflux_downloads/
root@sms:/var/smb# cd samba/
root@sms:/var/smb/samba# pwd
/var/smb/samba
Page 41
5.3.4 less
Pager utilities are useful for reading long outputs (through pipe) or files in a terminal for instance try
ls -lha /usr/bin/ | less
or opening a file with
less
README.txt
Use the arrows up/down and page up/page down to scroll the output, press Q to quit.
5.3.5 cat
cat is short for concatenate. It was originally designed to merge text files into one, but can be used for many other
purposes. To merge two or more files into one, you simply list the files after the cat command and then redirect the
new output to a file. cat works with standard input and standard output, so you have to use the shell redirection
characters. For example:
cat file1 file2 file3 > bigfile
One can also use cat to display files. Many people cat text files through the more or less commands, like this:
cat file1 | less
That will display the file1 file and pipe it through the less command so that you only get one screen at a time.
Another common use for cat is copying files. You can copy any file around with cat, like this:
cat /bin/bash > ~/mybash
The /bin/bash program is copied to your home directory and named mybash.
cat has many uses and the ones discussed here are just a few. Since cat makes extensive use of standard input and
standard output, it is ideal for use in shell scripts or part of other complex commands.
5.3.6 echo
The echo(1) command displays the specified text on the screen. You specify the string to display after the echo
command. By default echo will display the string and print a newline character after it.
You can pass the -n option to suppress the printing of the newline. The -e option will cause echo to search for escape
characters in the string and execute them.
5.3.7 touch
touch(1) is used to change the timestamp on a file. You can change access timestamps and modification timestamps
with this command. If the file specified does not exist, touch will create a zero length file with the name specified.
5.3.8 mkdir rmdir
mkdir(1) will create a new directory. You simply specify the directory to create when you run mkdir. This example
creates the newfolder directory in the current directory.
root@sms:~# mkdir newfolder
The -p option will tell mkdir to make any parent directories. For instance the command mkdir /root/new/new2
will fail if /root/new doesnt exist but with the -p option it will create /root/new first and then /root/new/new2.
root@sms:~# mkdir /root/new/new1
mkdir: cannot create directory `/root/new/new1: No such file or directory
root@sms:~# mkdir -p /root/new/new1
root@sms:~# ls /root/new/
new1/
Exactly the opposite way rmdir works. To remove a dir use rmdir and to remove the dir and parent directories you
pass the -p option.
Tip: be vary careful when using rmdir -p as you may harm your system.
Page 42
mv file /tmp/
mv file1 file2
(rename file1 to file2
5.3.11 rm
rm(1) removes files and directory trees. DOS users will notice the similarity to both the del and deltree
commands. rm can be very dangerous if you do not watch yourself.
rm file1 (delete file1)
rm -f file1
(force the deletion of file1)
rm -r /root/new/ (delete the directory /root/new/)
5.3.12 ln
ln(1) is used to create links between files. These links can be either hard links or soft (symbolic) links by passing the
-s option.
ln -s
/var/smb/samba
~/samba (create a symlink of /var/smb/samba to our
home directory)
5.3.13 grep
grep is used to for searching files or output for a pattern and return it.
root@sms:~# grep 192.168.2.11 /etc/rc.d/rc.inet1.conf
IPADDR[0]=192.168.2.11
or
root@sms:~# ps aux|grep sshd
root
3308 0.0 0.2
4208 1012 ?
Ss
14:18
0:00 /usr/sbin/sshd
grep has a lot of powerful options, use grep --help or man grep to find them.
5.3.14 find
The find(1) command allows the user to search the filesystem with a rich collection of search predicates.
Users may specify a search with filename wildcards, ranges of modification or creation times, or other advanced
properties.
root@sms:~# find /var/ -name samba
/var/spool/samba
/var/cache/samba
/var/log/samba
/var/smb/samba
5.3.15 which, whereis
which is usually used to locate a program quickly. It just searches your PATH and returns the first instance it finds
and the directory path to it.
whereis(1) command works similar to which, but can also search for man pages and source files.
root@sms:~# which grep
/usr/bin/grep
5.3.16 ps
ps is like activity monitor in OS X or task manager in Windows, it list all the running processes. For instance if we
want to check if smbd process is running we can type:
root@sms:~# ps aux|grep smbd
root
4305 1.0 0.7 17992 3680 ?
Ss
18:17
0:00 /usr/sbin/smbd
-D
root
4307 0.0 0.2 17992 1196 ?
S
18:17
0:00 /usr/sbin/smbd
-D
More info on how ps works and what are those numbers in man pages.
In the output above we hold that a smbd runs with pids 4305, 4307.
Page 43
Ctrl+G or F1 Help
Ctrl+O or F3 Save changes
Ctrl+X or F2 Exit nano and ask you to save if changes not saved.
Ctrl+W or F6 Search for a string
Ctrl+K or F9 Cut lines
Ctrl+U or F10 Uncut lines into current line.
Page 44
Page 45
Page 46
Otherwise, press
Page 47
Page 48
Page 49
Page 50
In Users tab you can add/delete edit users. To edit or delete a user, just select the user and edit his fields and press
apply or press delete to delete the user. To add a user fill up his fields like username password directory and set the
attributes, by clicking the boxes and press Add.
By clicking activate you enable the FTP server, Deactivate or Shutdown disable FTP server, Apply, apply changes
to FTP server, Help has a few notes about adding users and directories, that you should read.
Page 51
Page 52
Page 53
Page 54
Page 55
Page 56
Page 57
Page 59
Page 60
You can add additional options, by pressing Edit Client Options. When you done return to subnet list and start
server.
Page 61
Page 62
Page 63
To configure afpd through webmin just click on button Servers, and either create or edit one.
Page 65
To delete a user, select one or more users and press Delete Selected Users.
To edit a user just click on a user and edit its fields, like password UID e.t.c. You can also change passwords for
users at Webmin -> System -> Change Passwords, by clicking on a user and setting a new password.
Page 66
Page 67
Page 68