Hi,
I recently installed a second TrueNAS Scale system intended to be used as backup. I noticed a few differences compared to my main TrueNAS Scale system :
-
I was warned about giving root access to the web interface (I understand the risks) and was offered to create an admin account. That admin account was set to ID 950.
-
I created the same users I have my on MAIN TrueNAS system and instead of IDs starting at the usual 1000 I noticed they were moved to 3000.
Following the changes I’ve seen above and to keep things the same, I wanted to make the following changes to my main TrueNAS system :
-
I have 3 users, all assigned to IDs 1000 to 1002. I would like to move them to 3000.
-
I created an admin account and prevent root from gaining web access however the admin account I created was assigned ID 3000.
I’ve tried to change these by editing the passwd and group files under /etc however, every time I would reboot the system those IDs would reset to their original values.
I did some research and seems this is because of what is stored in the SMB config. Someone used the following command “midclt call smb.configure -job” which did the exact same thing as when I reboot, resetting passwd and group to what they were.
So I guess if I want to change any of the user IDs, I have to configuration SMB. I wasn’t able to find where I could do this from the web interface and didn’t find any smb.conf in the system or anything else that could help me understand how to make these changes.
Does anyone have a clue how to do this?
Where did you find this? That’s totally wrong If you’re trying to create users that have same IDs on another NAS you simply choose the correct UID at create time (this is configurable).
As I explained before, if I execute that command, “midclt call smb.configure -job” it resets everything. If I don’t execute that command and change what I need by editing passwd and group in etc the same thing happens.
Instead of pointing out that this is wrong, would you mind being helpful then and if you have a clue why is it that when I editing passwd and group and reboot everything goes back to what it was before?
If you have no clue, the is not point in just telling me I’m wrong… If I am wrong and you have a solution then at least share it.
Also, thanks for pointing the obvious… I explained prior what I noticed AFTER I created a brand new TRUENAS backup server that the IDs were not the same hence why I am trying to make them the same on both systems. My old and permanent TrueNAS system if using an older scheme it seems as non builtin users are created from 1000.
Anyway. If anyone has a clue on why edits in passwd and group are not persisted after reboot and just reset, I would like to know thanks.
Wait, what?
Manually trying to add, remove or change users or groups in the shell by editing passwd, group and the like is a recipe for disaster.
You’re supposed to use the UI.
The TrueNAS middleware keeps it’s own database with the user and group data. You are sidestepping all that when attempting to brute force it in the shell.
1 Like
But it is the reason why it resets on boot
1 Like
Except from the UI it is impossible to change the USER ID and GROUP ID. I can’t even change the home directory (move it). Hence I did it the old fashion way. If I do this on a Debian or Ubuntu server there is no issue. If it is a recipe for disaster then there is a BUNCH of other things I need to do after; what I mean by that, if I add a new user, the information will go in passwd and group and a bunch or other places, there is a bunch of actions happening, I was hoping to do this through the command line since the UI wont allow me to do certain things.
To Clarify
From the UI, I cannot change the userID… I can change the primary group though… As for the home directory, on a new Truenas System, the admin user is created under /home/admin. Since I tried to add Admin on my old Truenas system, I can only do it through a share, it will not let me add under home even if I have a dir created there.
That was my guess as well. Since I couldn’t do what I wanted to do through the UI, I was hoping to do that through the command line but I guess that would be possible.