Category: OS


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:
http://yourdomain.com/test

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


Rewrite localization url with $_GET[‘lang’] variable
http://yourdomain.com/english

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


Redirect 301

http://www.yourdomain.com/ to http://yourdomain.com/

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$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 Terminal.app 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
ita
china

  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/com.apple.DirectoryServices.plist
$ 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:

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

  Category: OS
  Comments: None

How do I uninstall Java 7 and later versions on my Mac?

By Zilli,

Following the steps listed will uninstall Oracle Java from your system using a Terminal.

Click on the Finder icon located in your dock
Click on Applications tab on sidebar
Click on the Utilities folder
Double-click on the Terminal icon
In the Terminal window, copy and paste the command:

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

https://www.java.com/en/download/help/mac_uninstall_java.xml

  Category: OS
  Comments: None