Si je suis ici aujourd'hui c'est que je suis à cours de ressources. J'ai fouillé le web pour trouver ma solution mais je ne la vois pas. Je m'en remet à vous. Sans doute je suis passé à coté de quelque chose.

Voilà je vais vous expliquer un peu le contexte. Je prends la main sur Débian à travers la raspberry-pi sous Raspbian (Debian wheezy 7.8) qui est donc sous processeur ARM.
Aujourd'hui est installé sur la machine un serveur apache, une bdd mysql + phpmyadmin et ssh(de base) avec un utilisateur pi préconfiguré.
Ce que je cherche à faire c'est de créer des groupes chrootés dans leurs dossiers (liés symboliquement à un seul et unique dossier source).
J'aimerai désactiver l'utilisateur pi (trop connu) pour en changer mais rester utilisateur libre de mon système non chrooté.
EDIT: les problèmes que je rencontre sont les suivant :
- Mon user "6Q_rtG59[p" n'arrive pas à se connecter au terminal SSH et en SFTP tandis que l'utilisateur "pi" que je souhaite remplacer y accède.
- Mon user "tech0" arrive à se connecter en SFTP mais il est impossible de rentrer dans les dossiers "sitetech" et "siteclient". Je pense que c'est un problème de droit d'accès aux dossiers et/ou l'appartenance des dossiers.
- Mon user "tech0" arrive à se connecter au terminal SSH mais est déconnecté instantanément du serveur. Il doit y avoir une option que je n'ai pas vu qui lui interdit cela.
Aujourd'hui, voila à quoi ressemble mon /etc/ssh/sshd_config :
Code : Tout sélectionner
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
#RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
#IgnoreUserKnownHosts yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
#Subsystem sftp /usr/lib/openssh/sftp-server
#Subsystem sftp /bin/false
Subsystem sftp internal-sftp
UsePAM yes
#DenyUsers root
#AllowUsers 6Q_rtG59[p,pi
#DenyGroups root
#AllowGroups siteclient,sitetech,pi,6Q_rtG59[p,pi
Match Group siteclient
ChrootDirectory /home/users/%u
ForceCommand internal-sftp
X11Forwarding no
AllowTCPForwarding no
Match Group sitetech
ChrootDirectory /home/users/%u
ForceCommand internal-sftp
X11Forwarding no
AllowTCPForwarding no
Code : Tout sélectionner
#DenyUsers root
#AllowUsers 6Q_rtG59[p,pi
#DenyGroups root
#AllowGroups siteclient,sitetech,pi,6Q_rtG59[p,pi
mon arborescence :
Code : Tout sélectionner
/
|--/home
|---/pi
|---/sftp
| |---/siteclient
| | |---/public_html
| |---/sitetech
| | |---/public_html
|---/users
| |---/tech0
| | |---/sitclient
| | | |---/public_html
| | |---/sitetech
| | | |---/public_html
|---/6Q_rtG59[p
Code : Tout sélectionner
sudo ln -s /home/sft/siteclient /home/users/tech0
mes droits et possessions de dossiers :
ls -ld /home
Code : Tout sélectionner
drwxr-xr-x 7 root root 4096 mai 19 08:59 /home
Code : Tout sélectionner
total 20
drwxr-xr-x 2 6Q_rtG59[p 6Q_rtG59[p 4096 mai 19 09:05 6Q_rtG59[p
drwxr-xr-x 3 pi pi 4096 mai 19 12:39 pi
drwxr-xr-x 5 root root 4096 mai 19 08:39 sftp
drwxr-xr-x 3 root root 4096 mai 19 08:40 users
drwxrwxrwx 2 root root 4096 mai 9 16:41 www
Code : Tout sélectionner
total 12
drwxr-xr-x 3 root root 4096 mai 19 08:46 centrale
drwxr-xr-x 3 root root 4096 mai 19 08:41 siteclient
drwxr-xr-x 3 root root 4096 mai 19 08:44 sitetech
Code : Tout sélectionner
total 4
drwxrwxr-x 2 root siteclient 4096 mai 19 08:41 public_html
Code : Tout sélectionner
total 4
drwxrwxr-x 2 root sitetech 4096 mai 19 08:44 public_html
Code : Tout sélectionner
total 4
drwxr-xr-x 2 root root 4096 mai 19 12:05 tech0
Code : Tout sélectionner
total 0
lrwxrwxrwx 1 tech0 root 21 mai 19 11:58 siteclient -> /home/sftp/siteclient
lrwxrwxrwx 1 tech0 root 19 mai 19 12:05 sitetech -> /home/sftp/sitetech
mon /etc/group :
Code : Tout sélectionner
root:x:0:
adm:x:4:pi,6Q_rtG59[p
dialout:x:20:pi,6Q_rtG59[p
cdrom:x:24:pi,6Q_rtG59[p
sudo:x:27:pi,6Q_rtG59[p
audio:x:29:pi,6Q_rtG59[p
video:x:44:pi,6Q_rtG59[p
plugdev:x:46:pi,6Q_rtG59[p
games:x:60:pi,6Q_rtG59[p
users:x:100:pi,6Q_rtG59[p
pi:x:1000:
netdev:x:105:pi,6Q_rtG59[p
input:x:999:pi,6Q_rtG59[p
indiecity:x:1001:root
spi:x:1002:pi,6Q_rtG59[p
gpio:x:1003:pi,6Q_rtG59[p
siteclient:x:1004:6Q_rtG59[p
sitetech:x:1005:6Q_rtG59[p
6Q_rtG59[p:x:1007:6Q_rtG59[p
mon /etc/passwd :
Code : Tout sélectionner
tech0:x:1001:1004::/home/users/tech0:/bin/bash
6Q_rtG59[p:x:1002:1007::/home/6Q_rtG59[p:/bin/bash
pi:x:1000:1000:,,,:/home/pi:/bin/bash
Je vous aurai bien envoyé le log auth.log mais celui ne donne rien.
Merci par avance du temps que vous m'offrirez.

J'ai essayé d'être le plus clair possible que ce soit en écriture qu'en schéma/code.
Cd, bigbrownies