http://www.packtpub.com/article/local-user-management-freenas

1. create a group. Each user must belong to a group.

  • To create a group, go to Access: Users and Groups and click on the Group tab
  • Now click on the add circle. you need to add a name and a description.
  • Now click Add and then apply the changes.
  • Only a-z, A-Z, and 0-9 are supported in the group name. _ (underscores) and spaces are not supported, neither are punctuation characters like $%&* etc.

[BK: Insert instructions to create home directories for each user here. Apparently, the user's home directory needs to be created before you can assign it on the add user screen. Creating the directories for a batch of users first should avoid having to go back to each user's screen a second time to enter the directory.]

[BK: A suggestion about how to add directories for a list of users is given on this blog: http://blog.techfornonprofits.com/2011/08/adding-multiple-users-to-freenas-part-1.html

Assuming that it is necessary to go to a command line to create the directories, I would recommend creating the shell script and pre-loading it on the server image in the /mnt/home directory, which will become the parent directory for all of the user's home directories.]

2. Click on the Users tab. And then on the add circle.

Login:the unique login name of user.
Full Name: The user's full name.
Password: Their password (with confirmation). The colon ':' character isn't allowed in the password.
Primary Group: The group to which they belong

click Add and apply the changes

Using CIFS with Local Users

[BK: Clarify that this is necessary to allow each user to access their home directory on a Windows client. After this is done they will be able to see their directory as a folder on a Windows computer. Provide user instructions to login to the server in another section.]

To use the users you have defined with Windows networking, you need to go to the Services: CIFS/SMBpage and change the Authentication field to Local User. Then click Save and Restart to apply your changes.

Creating a FreeNAS CIFS/SMB Share

If you have a Windows XP or Vista Machine,creating a CIFS/SMB Share should be one of the first things to do after your initial build of FreeNAS. Most of your content you want sharing will be on the PC or accessible through them and this is probably the easiest way copy that content over.

FreeNAS CIFS SMB Setup Step 1

From your FreeNAS Web Console, click on Services and then CIFS/SMB.

FReeNAS CIFS/SMB Setup

On the Settings tab:-

  1. Check the on Enable box
  2. Enter the Netbios Name. This is the name that the FreeNAS machine will announce itself as to all other Windows Machines on the network.
  3. Enter the Workgroup name. This is WORKGROUP by default and should be fine to remain as this. Check you own PC Workgroup if you have problems with this. (Start--> Control Panel--> System--> Computer Name tab)
  4. Enter a description of the server. This is some descriptive text that will appear when browsing for windows machines on the network.
Click on Save and Restart

FTP and User Login

On the Services: FTP, there are two fields that control how users log in to the FreeNAS server:

  • Anonymous login: This means the user connects with the user name anonymous and any password.
  • Local User: This enables a local user login. Users log in using the user name and passwords defined in the Access: Users and Groups page.
Other than the security benefits, another advantage of local user login with FTP is that you can define a home directory for the user and when the user logs in, they will be taken to that directory and only they have access to that directory and those below it. This effectively offers each user their own space on the server and other users cannot interfere with their files.

[BK: The following section should be moved earlier before creating the individual users. Most of it can be replaced with specific instructions about how to create the directories, and then include item #2 below in the instructions to set the home directory when adding each user.]

To get this working, you need to create a directory on your shared disk. You can do this with any of the access protocols CIFS, NFS, FTP, and AFS. You need to connect to the shared disk and create a new folder.

*1. Access: Users, either create a new user or edit an existing one (by clicking on the 'e' in a circle).

2. In the Home directory, you need to enter the directory for that user. Assuming the disk is named store then the path for the home directory would be: /mnt/store/username.

Click Save and apply the changes. Now when John logs in using the user name john he will be taken directly to the john directory. He doesn't have access to other files or folders on the store disk, only those in john and any sub folder.

chroot() Everyone, but Root*

In the advanced settings section of the Services: FTP page, there is a field called chroot() everyone, but root. What this means is that when a user logs in via FTP, the root directory (top or start directory) for them will be the directory set in the Home directory field. Without this set, the user will log in to the server at the physical / and will see the server in its entirety including the FreeNAS and FreeBSD system files. It is much safer to have this box checked. The exception to this is the user root (which in FreeBSD terms is the system administer account). If Permit root login is enabled, then the user root can log in and they will be taken to the root of the actual server. This can be useful if you ever need to alter any of the system files on the FreeNAS, but this isn't recommend unless you absolutely know what you are doing!

-- MaryWillette - 2012-05-06

Topic revision: r3 - 2012-05-13 - MaryWillette
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback