Login as either root or user

su

(enter root password if not logged in as root)

Update the repository listings

apt-get update
apt-get upgrade

Time to install Samba

apt-get install samba

Make a copy of the original config file

cp /etc/samba/smb.conf /etc/samba/smb.conf.original
chmod a-w /etc/samba/smb.conf.original

Change the config file

nano /etc/samba/smb.conf

find workgroup using ctrl+w, change the following

workgroup = your workgroup

security = user

In the printers section add

browsable = yes
guest ok = yes

ctrl+x – to close and save the file

Restart samba service

/etc/init.d/samba restart

Now time to setup Cups

apt-get install cups

Make a copy of the original config file

cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original
chmod a-w /etc/cups/cupsd.conf.original

Change the config file, mine is displayed below for reference. (make sure to replace .xxx with your servers ip address)

nano /etc/cups/cupsd.conf

 

# Administrator user group…
SystemGroup lpadmin
# Only listen for connections from the local machine.
#Listen localhost:631
Listen 192.168.1.xxx:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL

# Default authentication type, when authentication is required…
DefaultAuthType Basic

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

# Restrict access to the admin pages…
<Location /admin>
Order allow,deny
Allow @LOCAL
</Location>

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

 

Restart the cups service

/etc/init.d/cups restart

Add your user to the lpadmin group

usermod -aG lpadmin yourusername

You’re all done you can now go to  ‘http://serverIP:631/admin’ to configure cups.

 

Comments are closed.