Page 1 of 1

SSH superuser access to NAT

Posted: 14 Dec 2023, 05:00
by n3cr0x
Hello. I don't know what username/password I need to connect to NAS via ssh. I was also able to connect with the data from the username I created when I first set up the NAS and used the username/password. But when I tried to get root privileges through the command ( sudo -i ) I got this error:

Code: Select all

ssh -p 9229 test@192.168.178.20
(test@192.168.178.20) Password: 
Welcome to TNAS!
sudo -i
sudo: unknown user: root
sudo: unable to initialize policy plugin
Which user on the system has root privileges? Is this my new user or is there another user? If it is not root, who is it?

I want to install and configure the databases via SSH. Where do I start?

Re: SSH superuser access to NAT

Posted: 14 Dec 2023, 07:05
by Gremlin
In TOS5+ root and admin were disabled as users (ostensibly to reduce risks of hacking and ransonware attacks). The user created at time of installation is the 'superadmin' or whatever you want to call it. You cannot 'gain root access/priviledge' in the usual unix/linux manner. Confusing, for us oldies anyway ;)

Re: SSH superuser access to NAT

Posted: 14 Dec 2023, 11:48
by TMroy
Using the 'superuser' to obtain permissions equivalent to root can enhance system security because the 'superuser' is defined by the user.

Re: SSH superuser access to NAT

Posted: 15 Dec 2023, 15:02
by n3cr0x
Gremlin wrote: 14 Dec 2023, 07:05 In TOS5+ root and admin were disabled as users (ostensibly to reduce risks of hacking and ransonware attacks). The user created at time of installation is the 'superadmin' or whatever you want to call it. You cannot 'gain root access/priviledge' in the usual unix/linux manner. Confusing, for us oldies anyway ;)
Thanx

Re: SSH superuser access to NAT

Posted: 11 Feb 2024, 18:39
by 02Juanc86
I have the same issue (cant get root permissions) but I'm already using the first created user ("Admin user") cf. images bellow. Im using TOS 5.1.123.

User used to connection on SSH
Image

SSH connection established but not root permission to after Sudo -i
Image

What I'm doing wrong ? Why I can't have the root permissions with admin usr ?

Re: SSH superuser access to NAT

Posted: 11 Feb 2024, 18:45
by Gremlin
rather than saying 'root user is disabled' think 'root PERMISSIONS are disabled'. This is not your 'normal' linux so you have to think laterally.

Re: SSH superuser access to NAT

Posted: 19 Feb 2024, 14:54
by n3cr0x
Yes, thank you. I have already come up with a non-standard solution - I installed the server OS RHEL 9.3 and control all processes and permissions myself, as well as installing exactly the software I need.

I understand that you want to release your own build for NAS devices, but it's terrible, it's absolutely impossible to use. If you think that the majority will adapt to you, then I hasten to disappoint you, even Synology's software is poor, it's suitable for housewives unfamiliar with PCs.

Think carefully about who your target audience is, and perhaps you will reconsider your terms and standards. No advanced user will put up with such restrictions; there are plenty of ways to secure your server, so few will use your OS. Instead of copying someone, you'd better make something flexible and unique, so that the end user can decide for themselves what to do. For example, create different templates for a configured OS and manual setup during installation, where every nuance can be flexibly configured by the user.