Category: OS

FreeBSD – Install and Configure Webmin Web-based Interface

By Zilli,

Webmin is a web-based interface for system administration for Unix including FreeBSD. Using any browser that supports tables and forms, you can setup user accounts, Apache, DNS, file sharing, firewall and so on. Webmin consists of a simple To install webmin, update your ports, enter:

# portsnap fetch update

Install webmin from /usr/ports/sysutils/webmin, enter:

# cd /usr/ports/sysutils/webmin
# make install clean

Configure webmin

Now, webmin is installed. Start webmin on startup, enter:

# vi /etc/rc.conf

Append following line:


Save and close the file. You need to run /usr/local/lib/webmin/ script in order to setup the various config files, enter:

# /usr/local/lib/webmin/

Sample output:

*            Welcome to the Webmin setup script, version 1.420        *
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /usr/local/lib/webmin ...
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Log file directory [/var/log/webmin]: [Press Enter]
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):  [Press Enter]
Testing Perl ...
Perl seems to be installed ok
Operating system name:    FreeBSD
Operating system version: 7.0
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
 - What port to run the web server on. There must not be another
   web server already using this port.
 - The login name required to access the web server.
 - The password required to access the web server.
 - If the webserver should use SSL (if your system supports it).
 - Whether to start webmin at boot time.
Web server port (default 10000):  [Press Enter]
Login name (default admin):  [Press Enter]
Login password: [type password]
Password again:
Use SSL (y/n): y
Creating web server config files..
Creating access control file..
Creating start and stop scripts..
Copying config files..
Changing ownership and permissions ..
Running postinstall scripts ..

How do I view webmin?

Fire a webbrowser and enter url: OR https://your-server-ip:10000/

  Category: OS
  Comments: Comments Off on FreeBSD – Install and Configure Webmin Web-based Interface

How to enable root login over SSH on FreeBSD

By Zilli,

Firstly, You will need to edit the SSH daemon configuration file to enable this like so..

vi /etc/ssh/sshd_config

ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
PermitRootLogin yes

Restart SSH daemon

/etc/rc.d/sshd restart

  Category: OS
  Comments: Comments Off on How to enable root login over SSH on FreeBSD

Apache – mod_rewrite rules

By Zilli,

Examples to configure rewrite rules in .htaccess file:

RewriteEngine On
RewriteRule ^test/?$ /testpage.php [L,NC]

Rewrite localization url with $_GET[‘lang’] variable

RewriteEngine On
RewriteRule ^(.*)/$ /$1 [R=permanent]
RewriteRule ^([a-z]{2})$ /index.php?lang=$1

Redirect 301 to

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

Enable spotlight indexing on a AFP network drive

By Zilli,

Indexing of an AFP-network drive isn’t a problem:

To enable spotlight indexing on a network drive open and enter:
mdutil /Volumes/name -i on

To disable the indexing of a connected network drive:
mdutil /Volumes/name -i off

To check the status of indexing on a connected network drive:
mdutil /Volumes/name -s

  Category: OS
  Comments: None

OS X Ripristino password Admin

By Zilli,

Avvia il Mac in modalità utente singolo tenendo premuti i tasti Command+S (o Mela+S che dir si voglia) finché non compaiono delle scritte sul terminale, digita:

$ fsck -fy 
$ mount -uw /
$ launchctl load /System/Library/LaunchDaemons/
$ dscl . -passwd /Users/username password

nomeutente è il vero nome utente (quello che sarebbe riportato vicino alla “casetta” per intenderci) e password la nuova password che vuoi impostare.
Se non conosci il nome utente di un account amministratore ti basterà digitare more /etc/passwd per visualizzare il file dove sono memorizzati tutti gli utenti presenti nel sistema. Noterai il tipo di privilegio dell’utente nella quinta colonna. Potresti inoltre cambiare direttamente la password dell’utente root (che sui sistemi Unix rappresenta il superuser del sistema e quindi con accesso totale).
Riavvia infine il sistema tenendo premuto il pulsante di accensione

  Category: OS
  Comments: None

SpamAssassin test

By Zilli,

To test SpamAssassin just send the following text into an e-mail and must surely be recognized as spam:


  Category: OS
  Comments: None