[Klug-general] how to access a synology DS916+ box?
Alan
alan at hipnosi.org
Mon Oct 30 17:57:00 UTC 2017
I think DSM is based on OpenBSD, so ordinary users wont have access to
ssh by default.
if I look at our user named "partimag":
cat /etc/passwd | grep partimag
partimag:x:1026:100:partimag share
user:/var/services/homes/partimag:/sbin/nologin
cat /etc/passwd | grep root
root:x:0:0:root:/root:/bin/ash
------------distraction warning begin-------
WTF is "ash" !!!????
ls -l /bin/ash
lrwxrwxrwx 1 root root 4 Jul 15 2016 /bin/ash -> bash
ah yes, small memory devices seem to use this "ash" alias for bash. hmm
I wonder why...
STOP! step away from the geekstractions and continue with the task at
hand...
------------distraction warning ends------
What this above means is that only root has bash. So try:
ssh -vv root at ipaddress
(use the admin's password on prompt)
Once logged in as root you can configure your user to have access to
bash with
vi /etc/passwd
[learn the basic vi commands if you don't know already] (do take care)
change the "/sbin/nologin" for your user line to "/sbin/ash"
On a *nix box you'd need to restart sshd with
system sshd restart
but on this... I don't know, reboot at last resort, but let the thread
know if you find out how to restart the ssh-shell service.
After this, I expect you can login as yourself.
On 30/10/17 15:32, Sharon Kimble wrote:
> Alan via Kent <kent at mailman.lug.org.uk> writes:
>
>> How to enable ssh/telnet on DSM:
>>
>>
https://www.synology.com/en-us/knowledgebase/DSM/help/DSM/AdminCenter/system_terminal
>>
>> I seem to recall that the root password is by default the same as
that of the admin user.
>
> Thanks for this Alan, I have enabled ssh as per the instructions, and
> finally found out why it kept telling me to change my password, after
> I'd logged out and back in again, and was forced to set a new password!
>
> So ssh is enabled, and checking using nmap I get this report
>
> --8<---------------cut here---------------start------------->8---
> Starting Nmap 7.40 ( https://nmap.org ) at 2017-10-30 13:18 GMT
> Nmap scan report for 192.168.1.104
> Host is up (0.00027s latency).
> Not shown: 989 closed ports
> PORT STATE SERVICE
> 21/tcp open ftp
> 22/tcp open ssh
> 80/tcp open http
> 139/tcp filtered netbios-ssn
> 443/tcp open https
> 445/tcp filtered microsoft-ds
> 873/tcp open rsync
> 3260/tcp filtered iscsi
> 3261/tcp filtered winshadow
> 5000/tcp open upnp
> 5001/tcp open commplex-link
> --8<---------------cut here---------------end--------------->8---
>
> Which is showing that ssh and rsync have open ports being used by them.
> But, if I try to ssh in I get this result -
>
> --8<---------------cut here---------------start------------->8---
> ssh boudiccas at 192.168.1.104
> boudiccas at 192.168.1.104's password:
> Permission denied, please try again.
> Connection to 192.168.1.104 closed.
> --8<---------------cut here---------------end--------------->8---
>
> And here I'm stuck! Can you help/advise please?
>
> Thanks
> Sharon.
>
>> ====================================
>>
>> On 30/10/17 11:10, Alan via Kent wrote:
>>
>> Look around the interface for a way of enabling ssh access. Once
this is
>> done you can use nmap to ascertain open ports on the device.
>> eg: if the device is on 192.168.1.220:
>>
>> #nmap 192.168.1.220
>>
>> This is the output when nmapping our synology
>>
>> Starting Nmap 7.01 ( https://nmap.org ) at 2017-10-30 09:07 GMT
>> Nmap scan report for 10.100.100.12
>> Host is up (0.00028s latency).
>> Not shown: 986 closed ports
>> PORT STATE SERVICE
>> 22/tcp open ssh
>> 80/tcp open http
>> 111/tcp open rpcbind
>> 139/tcp open netbios-ssn
>> 161/tcp open snmp
>> 443/tcp open https
>> 445/tcp open microsoft-ds
>> 548/tcp open afp
>> 2049/tcp open nfs
>> 5000/tcp open upnp
>> 5001/tcp open commplex-link
>> 49160/tcp open unknown
>> 50001/tcp open unknown
>> 50002/tcp open iiimsf
>> MAC Address: 00:11:xx:xx:xx:xx (Synology Incorporated)
>>
>> note: The port names are simply those contained in /etc/services
of the
>> scanning machine so may not be accurate as to the actual service.
>>
>> On 30/10/17 10:48, Sharon Kimble via Kent wrote:
>>
>> Now the builders have finished their works on my flat, I've
got my
>> synology box out, set it up and updated it. Its a 'DS916+'
with 4 4tb
>> drives raided to 8 tbs. I can access it using its web GUI,
but not from
>> the command line nor from nautilus. I can 'drag n'drop' to
it, but in
>> every other way its inaccessible to me, unfortunately.
>>
>> Can anyone help me gain access to it please? I've looked at
the synology
>> site help pages, and its as if they're talking a foreign
language, I
>> don't understand them at all!
>>
>> My ultimate aim is to be able to store rsync backups on it.
>>
>> Thanks
>> Sharon.
>
More information about the Kent
mailing list