Command line's creation of users and groups does not work in 9.3relese. Why?

Status
Not open for further replies.

Dmitry Nevozhay

Dabbler
Joined
May 30, 2014
Messages
30
Hi guys,
I've written the short script to automate creating the users and roles for set of plugins (where v1 is my RAIDZ2 volume, and v1/media is dataset):

pw groupadd -n media -g 816
pw groupadd -n plex -g 972
pw groupadd -n transmission -g 921
pw useradd -n media -u 816 -d /mnt/v1/media -s /bin/csh -g media -G transmission,plex
pw useradd -n plex -u 972 -d /mnt/v1/media -s /bin/csh -g plex -G media
pw useradd -n transmission -u 921 -d /mnt/v1/media -s /bin/csh -g transmission -G media

It seemed working on 9.2.1.7release i had before...
But now on fresh install of 9.3release it runs (in GUI shell, logged as root), but users and groups don't appear in GUI Accounts !
While checking from shell command line:
[root@freenas ~]# id plex
uid=972(plex) gid=972(plex) groups=972(plex),816(media)
[root@freenas ~]# id transmission
uid=921(transmission) gid=921(transmission) groups=921(transmission),816(media)
[root@freenas ~]# id media
uid=816(media) gid=816(media) groups=816(media),972(plex),921(transmission)

I don't understand, what's the problem in?
Is it a bug or misunderstood feature ?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
First, users and groups should *never* have been added to FreeNAS boxes from the CLI. They should *always* have been from the WebGUI.

That being said, the way it worked in all pre-9.3 was that if you created a user from the CLI the user would work, but on reboot the users and groups created or modified from the CLI were lost. This was because on bootup the users and groups were basically "created" during the bootup sequence by pulling the info out of your FreeNAS config file.

All of this being said, I just did a pw useradd on my 9.2.1.9 box and no user appeared in the WebGUI. I also tried to add a group and I got no change from the WebGUI. I don't have a 9.2.1.7 box around to test, but you should be on 9.2.1.9 because of some of the bugs in .7 and .8. ;)

So I'm inclined to say "It doesn't work like you think it works, it hasn't worked like you think it works, and it won't work like you think it works in the future". I'd say if you want those users and groups, why not create them, properly, in the WebGUI, where they will *always* exist and you aren't having to resort to hacky scripting to try to do whatever you want to do.
 
Status
Not open for further replies.
Top