Welcome to the Tiny Core Linux Wiki at tinycorelinux.net!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dcore:server_applications [2016/07/21 10:14]
nitram [smbclient]
dcore:server_applications [2017/09/19 12:36] (current)
sm8ps [Running]
Line 1: Line 1:
 ====== dCore Server & Networking ====== ====== dCore Server & Networking ======
-===== dCore Server Overview =====+===== Overview =====
 dCore may be used as a basic, lightweight home server. A text only server would require <64mb RAM (~42mb) at boot. It can utilize an existing swap partition, if already present. Otherwise create either a swap file or partition as needed. Although a live boot requires only ~20mb drive space (CD, DVD, USB, hard drive), a frugal text only installation (persistent hard drive install) likely requires ~100-200mb drive space, even after installing desired server and networking extensions. The Tiny Core base system, dCore components and server tools can all be managed from command line, no need to install Xorg/graphics. dCore may be used as a basic, lightweight home server. A text only server would require <64mb RAM (~42mb) at boot. It can utilize an existing swap partition, if already present. Otherwise create either a swap file or partition as needed. Although a live boot requires only ~20mb drive space (CD, DVD, USB, hard drive), a frugal text only installation (persistent hard drive install) likely requires ~100-200mb drive space, even after installing desired server and networking extensions. The Tiny Core base system, dCore components and server tools can all be managed from command line, no need to install Xorg/graphics.
  
Line 83: Line 83:
 To unmount, reboot or use for example: To unmount, reboot or use for example:
     sudo umount /dev/sda1     sudo umount /dev/sda1
 +    
 +===== Samba =====
 +[[https://en.wikipedia.org/wiki/Samba_(software)|Samba]] is a free software re-implementation of the SMB/CIFS networking protocol that provides file and print services for various Microsoft Windows clients. It is useful to connect Linux and Windows systems and access shared storage on most Windows-world ISP-provided routers. Numerous full featured file managers provide built-in network browsing support, such as Caja and PCManFM. Configuration is similar to any other Linux distribution, brief usage outlined below.
 +
 +Import Samba to load at boot:
 +<code>
 +sce-import -b samba
 +</code>
 +
 +Optional install of smbclient, provides useful ''smbtree'' command when setting up network:
 +<code>
 +sce-import -b smbclient
 +</code>
 +
 +Optional install of gvfs-backends, if not already included in the full-featured file manager of choice, to enable built-in network browsing functionality:
 +<code>
 +sce-import -b gvfs-backends
 +</code>
 +
 +Reboot system or manually load above using the [[http://wiki.tinycorelinux.net/dcore:sce-load_command|dCore sce-load Command]]:
 +<code>
 +sce-load samba smbclient gvfs-backends
 +</code>
 +Copy sample /usr/share/smb.conf file to /etc/samba/:
 +<code>
 +sudo cp /usr/share/smb.conf /etc/samba/
 +</code>
 +
 +Modify smb.conf file as desired, typically the trickiest part of setting up a Samba network. It may be easiest to modify an existing smb.conf file from a networked system or web search for sample configurations. Sometimes hardware and router reboots are helpful during initial setup, as well as stopping and restarting Samba between configuration changes.
 +
 +Run ''testparm'' command to check smb.conf utilization and integrity:
 +<code>
 +testparm
 +</code>
 +
 +Add //smb.conf// file to /opt/.filetool.lst:
 +<code>
 +echo "etc/samba/smb.conf" >> /opt/.filetool.lst
 +</code>
 +
 +Backup this file before reboot:
 +<code>
 +backup #or filetool.sh -b
 +</code>
 +
 +Restart Samba if it was already running before adding custom configuration (''top'' command will show //nmbd// and //smbd// running). If starting services manually, //nmbd// is usually started before //smbd//. If Samba does not start at boot, add the appropriate startup command(s) to /opt/bootlocal.sh. Useful commands to control Samba:
 +<code>
 +sudo service samba start
 +sudo service samba stop
 +sudo service samba restart
 +sudo service nmbd start
 +sudo service smbd start
 +sudo service nmbd stop
 +sudo service smbd stop
 +</code>
 +
 +Confirm Samba network shares:
 +<code>
 +sudo smbstatus
 +smbtree #if smbclient installed
 +</code>
 +
 +Temporary disable firewall or ensure the required ports are open for Samba functionality before testing.
  
 ===== smbclient ===== ===== smbclient =====
-[[https://www.samba.org/samba/docs/man/manpages/smbclient.1.html|smbclient]] is an ftp-like client to access SMB/CIFS resources on servers.+[[http://linux.die.net/man/1/smbclient|smbclient]] is an ftp-like client to access SMB/CIFS resources on servers.
  
 This guide installs and utilizes only //smbclient//, not the entire Samba suite. This guide installs and utilizes only //smbclient//, not the entire Samba suite.
Line 93: Line 156:
 This //smbclient// method provides a command line interface only to 'put' and 'get' files. It is simple to set up and does not require special configuration, such as modifying //iptables// or /etc/fstab, using a Samba configuration file (smb.conf), creating mount points or adding files to /opt/.filetool.lst. This //smbclient// method provides a command line interface only to 'put' and 'get' files. It is simple to set up and does not require special configuration, such as modifying //iptables// or /etc/fstab, using a Samba configuration file (smb.conf), creating mount points or adding files to /opt/.filetool.lst.
  
-Most routers are provided by the ISP and security can not be assured. The shared data will become always available, protected solely by the router's firewall. This method should, therefore, only be used to store and share non-sensitive data. If is prudent to review and tighten security and firewall settings from within the router's web interface before proceeding (eg. typical vs minimum security, disable wireless if not used, stronger password).+Most routers are provided by the ISP and security can not be assured. The shared data will become always available, protected solely by the router's firewall. This method should, therefore, only be used to store and share non-sensitive data. It is prudent to review and tighten security and firewall settings from within the router's web interface before proceeding (eg. typical vs minimum security, disable wireless if not used, stronger password).
  
 To determine the router's IP address using built-in tools, run //route// and //route -n//, example: To determine the router's IP address using built-in tools, run //route// and //route -n//, example:
Line 180: Line 243:
   hp7610_poster                       A  1890153  Thu Jul 14 20:00:26 2016   hp7610_poster                       A  1890153  Thu Jul 14 20:00:26 2016
   hp7610_quick_guide                  A  6995973  Thu Jul 14 20:00:02 2016   hp7610_quick_guide                  A  6995973  Thu Jul 14 20:00:02 2016
-  EMANUEL.pdf                         A   644459  Thu Jul 21 07:15:14 2016 
  
                 15713248 blocks of size 1024. 15667168 blocks available                 15713248 blocks of size 1024. 15667168 blocks available
 </code> </code>
 +
 +===== SSH =====
 +The OpenSSH-server package does not run "out of the box" because the SSH-keys must be created manually once and then included in 'mydata.tgz'.
 +
 +==== Preparations ====
 +  - After loading the extension for the first time, issue ''sudo ssh-keygen -A'' in order to have the necessary keys generated. This will populate '/etc/ssh/' with private and public keys.
 +  - Set a password for user "tc" by ''sudo passwd tc''. The traditional password is "tcuser".
 +  - Add "etc/ssh/" as well as "etc/shadow" to '/opt/.filetool.lst' and issue ''backup''.
 +
 +In principal it should not be necessary to set a password as there is the option //PermitEmptyPasswords// in '/etc/ssh/sshd_config'. However, this does not work at least on Ubuntu Xenial.
 +
 +
 +==== Running ====
 +Start the server via ''sudo /etc/init.d/ssh start'' or ''sudo service ssh start'' (on Ubuntu).
  
 **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]**
Print/export