Pagina 1 di 5

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 01 apr 2010, 23:55
da andreac
gnu_nix ha scritto:Ciao,
durante il passaggio 2 /mnt/ext/usr/sbin/sshd lo trovo invece in /usr/sbin invece di /mnt/ext/usr (in effetti la cartella usr non esiste : Sad : )
Qual e' il risultato di questo comando sul tuo nas?

Codice: Seleziona tutto

find / -name *sshd*
(se non riesci ad utilizzare il servizio sshd, prova a disattivarlo e riavviarlo qualche volta e attendi qualche minuto; se ancora non va, attiva ed utilizza il telnet per modificare i file che ti hanno creato problemi : Wink : )
potreste postarti il contenuto del vostro file sshd_config per favore??
# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server

AllowUsers admin amule
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 03 apr 2010, 20:54
da gnu_nix
Grazie, l'ho riconfigurato ed ora ho solo il problema con amuleweb, quando mi connetto via web ottengo il seguente errore:
"No password specified, login will not be allowed."

sai dove posso ottenere la gui remoa per amule??

Ciao
Gnu_nix

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 03 apr 2010, 22:25
da andreac
gnu_nix ha scritto:Grazie, l'ho riconfigurato ed ora ho solo il problema con amuleweb, quando mi connetto via web ottengo il seguente errore:
"No password specified, login will not be allowed."
Hai modificato il file amule.conf e remote.conf inserendo le password come da guida installazione amule?
sai dove posso ottenere la gui remoa per amule??
qui: http://www.amule.org/
scarica il file adatto al tuo sistema operativo e quando vai ad installare scegli solo amulegui

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 04 apr 2010, 00:02
da luciano
: On Topic Please :

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 04 apr 2010, 20:06
da gnu_nix
...scusate... : Blink :

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 26 mag 2010, 15:50
da dg1
ciao a tutti,
il tutorial funziona...
...pero' in questo modo l'utente "amule" (e/o tutti gli eventuali altri utenti autorizzati all'accesso ssh) riesce ad accedere in lettura e scrittura alle cartelle ed ai files degli altri utenti del nas... non valgono piu' cioe' le policy definite a livello di interfaccia web x il controllo dell'accesso (share, nfs e/o webdav)
mi sembra un effetto collaterale non trascurabile...
DG1

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 03 giu 2010, 20:16
da Charlie Brown
Salve,
a me questo tutorial funziona a metyà, nel senso che fino a che non riavvio il nas tutto ok, mentre se spengo e riaccedno il giorno dopo, non mi entra più con l'utente amule e devo rifare da capo....

Sapete dove posso sbagliare od eve c'è l'inghippo?

Ciao : Smile :

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 24 giu 2010, 09:22
da Charlie Brown
Posso avere un aiuto da chi ci capsice meglio?

Rinnovo la mia richiesta se è possibile avere un aiuto....
Questo tutorial per me non funziona, perchè se riavvio il NAS tutto torna come se non avessi fatto nulla....

Qualcuno mi conferma se ha avuto con un nas simile questo problema?

il mio è un TS-219P

Grazie

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 24 giu 2010, 10:29
da luciano
Charlie Brown sicuro che eseguendo il tutorial tu non abbia ricevuto errori dopo qualche comando?

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 24 giu 2010, 13:26
da Charlie Brown
Sicuro....
Infatti se non riavvio, l'utente amule entra in putty tranquillamente ed il comando amuled -f è ok.

Se riavvio l'utente amule non entra più e così via....e devo ricominciare da capo

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 24 giu 2010, 14:09
da luciano
mmh forse ho capito, credo tu debba sostituire HDA_ROOT con MD0_ROOT visto che hai un 219. Il tutorial è scritto per un 119 che non ha RAID.

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 24 giu 2010, 14:30
da Charlie Brown
luciano ha scritto:mmh forse ho capito, credo tu debba sostituire HDA_ROOT con MD0_ROOT visto che hai un 219. Il tutorial è scritto per un 119 che non ha RAID.
Ciao,

andando dentro la directory ecco quello che c'è

Codice: Seleziona tutto

[~] # cd /mnt
[/mnt] # ls -a
./        ../       HDA_ROOT/ HDB_ROOT/ config/   ext/

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 24 giu 2010, 15:04
da luciano
che conf di dischi hai? 2 in RAID-1?

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 24 giu 2010, 15:06
da Charlie Brown
Si,
due dischi in raid 1.

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 28 giu 2010, 19:37
da Charlie Brown
Nessuno può darmi una mano? : Cry :

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 29 giu 2010, 10:26
da luciano
lancia questo comando:

Codice: Seleziona tutto

mount -t ext2 /dev/mtdblock5 /tmp/config
... dopo di che incolla qui l'output di quest'altro comando:

Codice: Seleziona tutto

more /tmp/config/autorun.sh
ed anche l'output di questo:

Codice: Seleziona tutto

more /mnt/HDA_ROOT/.config/ssh/sshd_config

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 01 lug 2010, 23:46
da Charlie Brown
Ciao Grazie dell'interessamentp al mio problema
Eccomi qua per i codici

Codice: Seleziona tutto

[~] # more /tmp/config/autorun.sh
#ssh config

cp /mnt/HDA_ROOT/.config/ssh/sshd_config /etc/ssh/sshd_config
/etc/init.d/login.sh restart

E dell'altro comando

Codice: Seleziona tutto

[~] # more /mnt/HDA_ROOT/.config/ssh/sshd_config
#       $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem       sftp    /usr/libexec/sftp-server

AllowUsers admin amule
# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 08 lug 2010, 10:18
da Charlie Brown
Niente da fare? Nessuno?

Comuqnue per ovviare in parte, grazie ad un admin del sito adunanza, ho fatto queste operazioni:

Ho di fatto seguito la guida di questo topic fino alla fine, poi senza riavviare ho rimontato la partizione con:

Codice: Seleziona tutto

mount -t ext2 /dev/mtdblock5 /tmp/config
e spostato senza nessun errore riportato da putty con il comando

Codice: Seleziona tutto

mv /tmp/config/autorun.sh /etc/config
Poi ho copiato in altra posizione il file precedentemte modificato con vi (avevo aggiunto l'utente amule)

Codice: Seleziona tutto

cp /etc/ssh/sshd_config /etc/config/sshd_config
Ho modificato il file autorun.sh precedentemente spostato in questo modo:

Codice: Seleziona tutto

vi /etc/config/autorun.sh

#!/bin/sh

# SSH Config
cp /etc/config/sshd_config /etc/ssh/sshd_config
cp /etc/config/resolv.conf /etc/resolv.conf (questo è inserito per risolvere il problema allo squeezeboxserver dello squeezeboxtouch mettendo all'interno del file /etc/resolv.conf i dati giusti per la navigazione con fastweb)
sleep 2
/etc/init.d/login.sh restart
exit 0
Anche questo ho provato a renderlo avviabile

Codice: Seleziona tutto

chmod a+x /etc/config/autorun.sh
ma al riavvio del nas niente da fare, però se entro in putty come admin e lo mando in esecuzione manualmente

Codice: Seleziona tutto

cd /etc/config
./autorun.sh
dopo lo shutdown del servizio ssh, riavviando i servizi ssh da pannello di controllo qnap e rientrando in putty come utente amule, tutto funziona ed amuled -f può essere mandato in esecuzione...
Grazie a quest'ultima operazione manuale,funziona il tutto senza dover rifare le operazioni della guida di questo topic, ogni volta che riavvio il nas.
Con questa in parte ho risolto, ma sarei comunque grato, se qualche utente in possesso di un nas come il mio od altri mi dicessero se abbiano o no avuto problemi come il mio e come li abbiano risolti.

Un saluto

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 20 lug 2010, 10:52
da Charlie Brown
Mi sorge un dubbio,
dato che nessun mi risposnde, ma sono l'unico che ha questo problema con un TS-219P con dischi in raid? : Blink :

Re: Come poter utilizzare qualsiasi utente in SSH con QNAP

Inviato: 20 lug 2010, 11:29
da luciano
Charlie appena ho un attimo provo sul mio 239 e ti dico.