Synology smb_add_request timed out

If you get this error in your dmesg into your client connected to the Synology NAS, ssh into NAS and edit :

/usr/syno/etc/smb.conf

and add these lines into global section :

use sendfile = no
large readwrite = no

Then you can restart your NAS with :

/usr/syno/etc/rc.d/S80samba.sh restart

DTC change main domain name

If the default DTC installer don’t find the right domain name, you can change it here :

/var/lib/dtc/saved_install_config

The parameter is :  main_domain_name

And don’t forget to relaunch install with :

/usr/share/dtc/admin/install/install

Posted in Dev

Générer certificats SSL pour Apache

Comment générer un certificat SSL auto-signé pour apache.

openssl genrsa 1024 -rand/var/log/messages > nom.domaine.ltd.key

-> ne pas mettre de passphrase, sinon il faut la retaper à chaque démarrage d’apache.

openssl req -new -x509 -days 3650 -key nom.domaine.ltd.key -out nom.domaine.ltd.crt

-> génère un certificat valable 10 ans
-> dans les réponses, entrer le code pays, le département, la ville et puis le nom.domaine.ltd pour la partie "Common Name (eg, YOUR name)"

configurer apache2.conf (ou autre ssl.conf en fonction) avec :

SSLCertificateFile /etc/apache2/ssl/nom.domaine.ltd.crt
SSLCertificateKeyFile /var/lib/dtc/etc/ssl/nom.domaine.ltd.key

pour générer le fichier pem (utile pour courier par exemple) :

cat nom.domaine.tld.key nom.domaine.tld.crt > nom.domaine.tld.pem

Posted in Dev

Apache2 + SSL + Ubuntu : error 12263

When you apt-get apache2 and activate ssl, you get this strange error “-12263”.

Thanks to theatons.com where I found the solution.
The apt-get installation is indeed incomplete, you have to continue the process to make SSL effective :

wget  apache2-ssl.tar.gz
tar xzvf apache2-ssl.tar.gz
sudo mv ssleay.cnf /usr/share/apache2/
sudo mv apache2-ssl-certificate /usr/bin/
sudo mkdir /etc/apache2/ssl
sudo apache2-ssl-certificate

Then, you need to enable SSL in your apache config files :

sudo a2enmod ssl
sudo ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl

sudo gedit /etc/apache2/sites-available/ssl

NameVirtualHost *:443


ServerAdmin webmaster@localhost

SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem

DocumentRoot /var/www/

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2’s default start page
# in /apache2-default/, but still have / go to the right place
# Commented out for Ubuntu
#RedirectMatch ^/$ /apache2-default/

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ “/usr/share/doc/”

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128

sudo gedit /etc/apache2/sites-available/default
and make sure the following lines say this:

NameVirtualHost *:80

You will also need to edit sites-available default, and ssl:

sudo gedit /etc/apache2/sites-available/default

And the same again for the ssl file.
Here you will need to change the section which says ‘AllowOverride None’ to:

AllowOverride All

Then, reload your config and that’s all !

/etc/init.d/apache2 force-reload

source