second user with administrators privileges

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Hello,
I am contacting you because I have just upgraded from freenas 9.3 to Truenas 13.0 (new installation)
I had a question about the root user.
Indeed, in freenas 9.3, it was possible to create a standard user "xxxx" and to assign him the UID=0 as the root user. It was also possible to modify the UID once the users were created.
The goal was to put a very large password to root and to use the user "xxxx" to manage the NAS instead of the "root" user.
In Tuenas 13, it seems that assigning a UID=0 is not possible. When I create a user with UID=0, the value changes to 1000 at registration, then after that it is not possible to change it.

Do you know if it is possible to do this manipulation?

Regards
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Hello,
I am contacting you because I have just upgraded from freenas 9.3 to Truenas 13.0 (new installation)
I had a question about the root user.
Indeed, in freenas 9.3, it was possible to create a standard user "xxxx" and to assign him the UID=0 as the root user. It was also possible to modify the UID once the users were created.
The goal was to put a very large password to root and to use the user "xxxx" to manage the NAS instead of the "root" user.
In Tuenas 13, it seems that assigning a UID=0 is not possible. When I create a user with UID=0, the value changes to 1000 at registration, then after that it is not possible to change it.

Do you know if it is possible to do this manipulation?

Regards

This was a bug that was recently fixed in master IIRC. You can probably just go through sqlite3 and change the UID there. That said, do be aware that if you're intending to use this with SMB access, we store a NT hash (md4) of the password in our sqlite db (encrypted, but it's still there) and in /var/db/system/samba4/private. There is no way around this. It is dictated by the protocol.
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Sorry, I didn't understand everything you wrote.
I only want to manage my NAS with user "XXX" rather than with "root".
It's only a matter of additional security. Indeed it is easier for an attacker to find the root password (if a little too weak), rather than the login + password of another administrator user.
 

somethingweird

Contributor
Joined
Jan 27, 2022
Messages
183
Not possible, because in the documentation it mentions

"Only the root user account can log in to the TrueNAS web interface."

 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
yes indeed! :)
It's amazing that for an O.S. that pronounces security, can't connect with another admin user anymore. See disabling the root account.

Thank you
 

somethingweird

Contributor
Joined
Jan 27, 2022
Messages
183
enable 2FA to root - to security the web interface

 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If someone gets administrative access to the web UI, you are screwed. It does not make any difference if that user is named "root" or "starlord". I fail to see the "additional security" here.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
See also:
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
@danb35,
Yes, I had read 3 of the posts you quoted. But they seem to talk about a connection to the web interface with another user without administrator rights. That's what I understood, but my English is not very good.

In my application, it is a user with root rights (UID = 0)

@somethingweird
Ok, that answers the question.
The dual authentication system is a good idea.
However, when you want to free yourself from Google services, it's a bit paradoxical. Lol :)


If someone gets administrative access to the web UI, you are screwed. It does not make any difference if that user is named "root" or "starlord". I fail to see the "additional security" here.

I'm not a great security specialist, and I'm interested in tutorials for Truenas (if there are any). I'm trying to apply the few tips I've been given (also on other Linux systems, RPI,...)
I was told to use a strong password (or disable the root account if possible) and use another user with administrator rights. Because it is more difficult for an attacker to find the username + password than just the root admin password (since "root" is already known).
This is what I did on my freenas 9.3 at the time.
Although Truenas is not necessarily made to be accessible from outside, we can see that more and more steps are made from outside and therefore we expose more and more the NAS on the Internet. It's not my case, but I think it's always a plus.
Now once again, I am not a security specialist and I am stingy with recommendations and advice.

Translated with www.DeepL.com/Translator (free version)
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
@danb35,
Yes, I had read 3 of the posts you quoted. But they seem to talk about a connection to the web interface with another user without administrator privileges. That's what I understood, but my English is not very good.

In my application, it is a user with root rights (UID = 0)

@somethingweird
Ok, that answers the question.
The dual authentication system is a good idea.
However, when you want to free yourself from Google services, it's a bit paradoxical. Lol :)


If someone gets administrative access to the web UI, you are screwed. It does not make any difference if that user is named "root" or "starlord". I fail to see the "additional security" here.

I'm not a great security specialist, and I'm interested in tutorials for Truenas (if there are any). I'm trying to apply the few tips I've been given (also on other Linux systems, RPI,...)
I was told to use a strong password (or disable the root account if possible) and use another user with administrator privileges. Because it is more difficult for an attacker to find the username + password than just the root admin password (since "root" is already known).
This is what I did on my freenas 9.3 at the time.
Although Truenas is not necessarily made to be accessible from outside, we can see that more and more steps are made from outside and therefore we expose more and more the NAS on the Internet. It's not my case, but I think it's always a plus.
Now once again, I am not a security specialist and I am stingy with recommendations and advice.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I was told to use a strong password (or disable the root account if possible) and use another user with administrator privileges. Because it is more difficult for an attacker to find the username + password than just the root admin password (since "root" is already known).
It's all just a matter of entropy, really. A 10 character user name plus a 20 character password is less secure than "root" and a 40 character password.

Just use sufficiently long random passwords and a password manager and you are OK. My opinion, of course. And disable password authentication in favour of public/private key wherever possible, e.g. for SSH.
 

somethingweird

Contributor
Joined
Jan 27, 2022
Messages
183
@Paul042020 - yes, you're stingy on recommendations and advice.

The worst case - and this need to be patch every update
  • hack the GUI code - to accept another user and deny root
  • modify the nginx server on truenas to accept only certain ip range - mitigate some insecurity
That why this is opensource - get creativity. or send a request/ticket to ixsystem about this issue.
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Unfortunately I am unable to do all of this.
I use Freenas and now Truenas in a rather basic way.
My original question was simply that it was possible to do it before, and that it is no longer possible to do it. If it is no longer possible, it is no longer possible.
I am certainly not competent to know if this is a security issue or not.
I can only say that we are in an era where users are asking more and more to have access to their data from outside, and that this could be a weakness (from my non-expert point of view). Especially if it's people like me (lanbda user) who implement this kind of software for a company (small or big) or personal
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The only place where the root user comes into play is the web UI. And you should NEVER EVER make the web UI accessable from any untrusted network. Neither any sharing services that are not in jails, but that's a different topic.
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
The only place where the root user comes into play is the web UI. And you should NEVER EVER make the web UI accessable from any untrusted network. Neither any sharing services that are not in jails, but that's a different topic.
I am aware of this. Is this the case of all the "lambda" users who start to make their DIY NAS? I'm not sure.

It's all just a matter of entropy, really. A 10 character user name plus a 20 character password is less secure than "root" and a 40 character password.
Lol, I've always wondered if it's equivalent.

Thank you in any case for all your answers
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You can administer TrueNAS via users defined in TrueCommand (connected via API Key), which would allow you to set an unreasonably long and complicated password for root and never use it.
 
Top