groupadd & useradd

raymondcidad

Dabbler
Joined
Oct 17, 2011
Messages
20
Hey guys,
I'm struggling with some things in cmd line.

I'm controlling my freenas via ssh, but the traditional groupadd command doesn't seem to exist here.

So, I went and try the
Code:
pw groupadd 
command. It does create the entry of the group in /etc/group but the system does not recognize the group
Meaning: it doesn't appear on the web GUI or when I try
Code:
"pw useradd"


Am I missing something?

thanks
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Groups and Users are probably also stored in the FreeNAS database file, that might be the reason why they don't appear in the GUI.
 

raymondcidad

Dabbler
Joined
Oct 17, 2011
Messages
20
thanks for the reply.

so, its no possible to manage groups and users from ssh command line?

that doesnt sound right.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I don't mean to sound like I'm advocating against the commandline. The GUI is fine and pretty but sometimes it's better to know the commandline. But the manual talks about how to create the groups from the FreeNAS GUI. LOL.

I found http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/users-groups.html and I was able to create a group, but it was not recognized by the GUI. I rebooted and the group still isn't recognized by the GUI. Checking out /etc/groups I found that the group has disappeared. This is probably because /etc is read only after bootup.

So I unlocked /etc with mount -uw / then ran pw groupadd testgroup. It still didn't appear in the FreeNAS GUI, but after a reboot it disappeared again.

My guess is you are stuck adding groups(and probably users) from the GUI.
 

raymondcidad

Dabbler
Joined
Oct 17, 2011
Messages
20
yeah, same thing happened to me with the pw group add command.

still, this seems very very very weird to me that Freenas just doesn't allows you to manage users/groups in cmd line. @warri said can be b/c freenas uses another database.

is freenas gonna break my heard now that I'm so in love with it?

any comments from a freenas guru?
 

andyclimb

Contributor
Joined
Aug 17, 2012
Messages
101
I'll just add that in jails you have to do that. This has been causing me a lot of bother, trying to keep them all in sync. Especially when a new plugin uses a UID or GID that has already been used by another one. Trying to switch say vbox from 1001 to another because 1001 is taken by another user in the host.

I think a big overhaul is needed to share users, groups, UIDs and GIDs in-between jails!
 
D

dlavigne

Guest
No, that's one of the whole points of a jail: user and group separation. Think of it as a separate FreeBSD installation.
 

andyclimb

Contributor
Joined
Aug 17, 2012
Messages
101
I realise that, but then there are lots of instances where there is a desired interaction... especially with files.. think... plex, transmission, couch potato , etc etc etc...
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I realise that, but then there are lots of instances where there is a desired interaction... especially with files.. think... plex, transmission, couch potato , etc etc etc...

Right.. and the expectation is that you, as the admin of your server, will resolve those conflicts as you are the best person to set the permissions for your files and folders as well as user creation. That's how jails are designed to work, and how they do work. Nothing stops you from running one big fat jail for everything and then not having to deal with conflicts.

I think the confusion is that you don't understand that when you create a user in the WebGUI it has no effect on the jail. Likewise what you create in the jail is not a part of the host OS. It's your job to make those match if and when necessary.
 

haucesauce

Cadet
Joined
Sep 20, 2017
Messages
2
Right.. and the expectation is that you, as the admin of your server, will resolve those conflicts as you are the best person to set the permissions for your files and folders as well as user creation. That's how jails are designed to work, and how they do work. Nothing stops you from running one big fat jail for everything and then not having to deal with conflicts.

I think the confusion is that you don't understand that when you create a user in the WebGUI it has no effect on the jail. Likewise what you create in the jail is not a part of the host OS. It's your job to make those match if and when necessary.

Well said.
 
Top