User Tools

Site Tools


vm-stor

vm-stor - samba+cups file+printer sharing

Virtual machine tasks / role

  • nfs client (from )
  • samba file sharing
  • Printer server, my new Samsung color laser printer CLP-310N :D

To do:

  • backup of data (and vm's?)
  • quota
  • clamav?
  • encryption? of mail, data?
  • automount? externe hdd's?
  • xbox media server?

Setting up the NFS client mounts

See how it's done with the vm-template.

Installing and configuring Samba

Installing the software (also smbpasswd)

root@vm-stor:~# apt-get --no-install-recommends install samba
The following NEW packages will be installed:
  libavahi-client3 libavahi-common-data libavahi-common3 libcap2 libcups2
  libdbus-1-3 libfile-copy-recursive-perl libtalloc2 libwbclient0 samba
  samba-common ucf update-inetd
apt-get install samba-common-bin smbclient (?samba server?)

'exim' removal:

apt-get remove exim4* 

Change the security mode from 'share' to 'user': (?amongst other changes TODO?)

nano /etc/samba/smb.conf

Adding users that should get access to samba shares: Create a samba user: http://ubuntuforums.org/showthread.php?t=839414

touch /etc/samba/smbpasswd
chmod 655 smbpasswd (?)
smbpasswd -a samba_username
  New SMB password:
  Retype new SMB password:
  Failed to add entry for user samba_username.
useradd samba_username --shell /bin/false
smbpasswd -a samba_username
  New SMB password:
  Retype new SMB password:
  Added user samba_username.

Ok! The user 'samba_username' has been successfully added to the samba database.

http://crazytoon.com/2007/05/11/centos-and-redhat-problem-nfs-mount-at-boot-up-fails-with-error-system-error-no-route-to-host/

xbox media server: http://ushare.geexbox.org/ http://www.google.nl/search?sourceid=chrome&ie=UTF-8&q=linux+xbox+media+server

Printer server

Samba + CUPS

[samba + printer]

printer accounting: http://www.pykota.com/wiki/PykotaonUbuntu

printer price per print: http://www1.lexmark.com/content/en_us/products/ink-toner/iso_page_yields_overview.shtml http://www.hp.com/pageyield/articles/ca/en/LaserJetPageYields.html http://www.samsung.com/nl/support/detail/supportPrdDetail.do?menu=SP01&prd_mdl_cd=CLP-310N/SEE&prd_mdl_name=CLP-310N&prd_ia_sub_class_cd=P

?
<hidden onHidden="click to show contents of /etc/cupsd/**cupsd.conf**" onVisible="click to hide contents of /etc/cupsd/**cupsd.conf**">

Remember to change <]ALLOWED_IP_ADDRESSES[> and <]IP_ADDRESS[> :

cupsd.conf
#
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#
 
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn
 
# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0
 
# Administrator user group...
SystemGroup lpadmin
 
 
# Only listen for connections from the local machine.
Listen localhost:631
Listen <]IP_ADDRESS[>:631
Listen /var/run/cups/cups.sock
 
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
#seb:BrowseAllow all
BrowseLocalProtocols CUPS dnssd
 
# Default authentication type, when authentication is required...
DefaultAuthType Basic
#seb
DefaultEncryption IfRequested
 
# Restrict access to the server...
<Location />
  Order allow,deny
  Allow localhost
  Allow <]ALLOWED_IP_ADDRESSES[>
</Location>
#seb above
 
# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow localhost
  Allow <]ALLOWED_IP_ADDRESSES[>
</Location>
 
# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
  Allow <]ALLOWED_IP_ADDRESSES[>
</Location>
#seb origineel:
#  AuthType Default
#  Require user @SYSTEM
#  Order allow,deny
 
# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
 
  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
 
  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
 
  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
 
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
 
# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>
 
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
 
  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
 
  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
 
  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
 
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
 
#
#

</hidden>


Please leave feedback or questions at the main page.

vm-stor.txt ยท Last modified: 2023-02-28 16:44 by 127.0.0.1