This walk through demonstrate how to assign home folder to domain users and implement disk quota
Step 1: Configure Winbind
1.1. Configuring Winbind. Type the following on the command prompt
$ ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/libnss_winbind.so <enter>
$ ln -s /lib/libnss_winbin.so /lib/libnss_winbind.so.2 <enter>
1.2. Modify the /etc/nsswitch.conf
$ vim /etc/nsswitch.conf
Add the keyword winbind to the stanza passwd and group
As mention in the reference, in some systems the keyword compat is used instead of files.
1.3. Testing.
1.3.1. Check if winbind is pingable, type the command below:
$ /usr/local/samba/bin/wbinfo -p <enter>
Ping to winbindd succeeded
1.3.2. Show list of users, type the command below:
$ /usr/local/samba/bin/wbinfo -u <enter>
. . .
Administrator
Guest
. . .
The command output is somewhat similar above.
1.3.3. Command "getent passwd" should return output similar shown below:
$ getent passwd <enter>
. . .
\Administrator:*:0:100::/home/Administrator:/bin/false
\Guest:*:3000011:3000012::/home/Guest:/bin/false
. . .
1.3.4. Show information about user using id command
$ id administrator <enter>
uid=0(root) gid=100(users) groups=0(root),100(users),3000004(Group Policy Creator Owners), . . .
As mentioned in the reference, if all these steps are ok then the installation of libnss_winbind is successful and you can enjoy manipulating domain users uid and gid in a much more friendly way.
Step 2. Creating a shared folder
2.1. Edit the smb.conf file
$ vim /usr/local/samba/etc/smb.conf <enter>
modify the smb.conf file to add the lines below,
[homes]
comment = Home Directory
path = /home
read only = No
2.2. Configure user's home directory using the tool Remote System Administration Tool (RSAT). Login as administrator in a domain member client PC (RSAT installed) and access Active Directory Users and Computers.
Step 1: Configure Winbind
1.1. Configuring Winbind. Type the following on the command prompt
$ ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/libnss_winbind.so <enter>
$ ln -s /lib/libnss_winbin.so /lib/libnss_winbind.so.2 <enter>
1.2. Modify the /etc/nsswitch.conf
$ vim /etc/nsswitch.conf
Add the keyword winbind to the stanza passwd and group
passwd: files
winbind
group: files
winbind
shadow: filesAs mention in the reference, in some systems the keyword compat is used instead of files.
1.3. Testing.
1.3.1. Check if winbind is pingable, type the command below:
$ /usr/local/samba/bin/wbinfo -p <enter>
Ping to winbindd succeeded
1.3.2. Show list of users, type the command below:
$ /usr/local/samba/bin/wbinfo -u <enter>
. . .
Administrator
Guest
. . .
The command output is somewhat similar above.
1.3.3. Command "getent passwd" should return output similar shown below:
$ getent passwd <enter>
. . .
\Administrator:*:0:100::/home/Administrator:/bin/false
\Guest:*:3000011:3000012::/home/Guest:/bin/false
. . .
1.3.4. Show information about user using id command
$ id administrator <enter>
uid=0(root) gid=100(users) groups=0(root),100(users),3000004(Group Policy Creator Owners), . . .
As mentioned in the reference, if all these steps are ok then the installation of libnss_winbind is successful and you can enjoy manipulating domain users uid and gid in a much more friendly way.
Step 2. Creating a shared folder
2.1. Edit the smb.conf file
$ vim /usr/local/samba/etc/smb.conf <enter>
modify the smb.conf file to add the lines below,
[homes]
comment = Home Directory
path = /home
read only = No
2.2. Configure user's home directory using the tool Remote System Administration Tool (RSAT). Login as administrator in a domain member client PC (RSAT installed) and access Active Directory Users and Computers.
Select the OU where the user belongs and click the User's Properties
When clicking apply, the %username% label will be replaced by the user's actual name. In your samba4 home (/home) directory, it will also create that folder automatically for that user.
Now login the user from the same or different domain member pc and a network drive (home folder) will be automatically map for the user.
Step 3: Configure Disk Quota for the user.
<to be continue>
Reference:
Reference:
- https://wiki.samba.org/index.php/Samba4/Winbind
- http://www.thegeekstuff.com/2010/07/disk-quota/