Samba Domaincontroller For Small Workgroups With SWAT On Fedora 8 - Page 2

Want to support HowtoForge? Become a subscriber!
 
Submitted by o.meyer (Contact Author) (Forums) on Tue, 2007-12-11 18:17. ::

4.3 CUPS

If you set up a server without gui you have to edit the IP configuration to use the CUPS webinterface. Replace %vm_ip% with your vm's IP (e.g.: 192.168.0.100) and %workstation_ip% with the IP from the workstation that you'll use to access the CUPS webinterface.

vi /etc/cups/cupsd.conf

Change:

Listen localhost:631

To:

Listen %vm_ip%:631

Change:

# Restrict access to the server...
<Location />
Order allow,deny
Allow localhost
</Location>

# Restrict access to the admin pages...
<Location /admin>
Encryption Required
Order allow,deny
Allow localhost
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow localhost
</Location>

To:

# Restrict access to the server...
<Location />
Order allow,deny
Allow localhost
Allow %workstation_ip%
</Location>

# Restrict access to the admin pages...
<Location /admin>
Encryption Required
Order allow,deny
Allow localhost
Allow %workstation_ip%
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow localhost
Allow %workstation_ip%
</Location>

Now we create an SSL certificate for the CUPS webinterface:

openssl req -new -x509 -keyout /etc/cups/ssl/server.key \
-out /etc/cups/ssl/server.crt -days 365 -nodes

Afterwards restart CUPS:

/etc/init.d/cups restart

Now you're able to manage your CUPS printers via the CUPS webinterface from your workstation. Open https://%vm_ip%:631/ within your preferred browser and log in as root. Please note that if there is no Linux driver available for your printer and you want to use this printer only from your Windows workstations trough SAMBA, you can use the printer manufacturer "RAW" and install the correct driver on your Windows workstations.

Please note that if you are going to set up a HP printer, you should add it to CUPS via hplip (command line). The exact command depends on the connection type of your device - have a look at "hp-setup --help". E.g.: For a network-printer with the IP 192.168.0.20 the command is "hp-setup -i 192.168.0.20". Afterwards you can adjust the printer settings (resolution etc.) within the CUPS webinterface.

After you added a new printer to CUPS, you'll have to add it to Samba via

cupsaddsmb -a

 

4.4 Quota

Now we prepare the system for quota usage.

vi /etc/fstab

Add usrquota and grpquota to the line for the root partition. The options should look like in this line:

/dev/VolGroup00/LogVol00 / ext3 defaults,usrquota,grpquota 1 1

Afterwards we create the files for the quota settings and remount the root partition.

touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
quotacheck -avugm
quotaon -avug

Note: You'll get an error like this when you start quotacheck -avugm for the first time:

quotacheck: WARNING - Quotafile //aquota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING - Quotafile //aquota.group was probably truncated. Cannot save quota settings...

This is normal and nothing to worry about. How to use quota for users is explained later in this howto when we add users to our Samba domain.

 

4.5 Hosts

Add your host's IP and all computers of your workgroup to the hosts file on the server.

vi /etc/hosts

It should look like this:

# Do not remove the following line, or various programs
 # that require network functionality will fail.
 127.0.0.1       localhost.localdomain   localhost
 192.168.0.100   server1.example.com     server1
 192.168.0.110   workstation1
 192.168.0.111   workstation2
 192.168.0.112   workstation3
 ::1     localhost6.localdomain6 localhost6

 

4.6 Services

Now we enable the automatic startup of the needed services.

chkconfig smb on
chkconfig nmb on
chkconfig winbind on
chkconfig swat on

Afterwards reboot the system.

reboot


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.