Welcome to FreeSoftwareServers Confluence Wiki

You can use "user/password" database setup w/ SAMBA but I prefer to use IP address's. You can specify entire networks by doing something like 192.168. or specify all the way down to a static IP.

sudo nano /etc/samba/smb.conf && sudo service samba restart
[root]

path = /
available = yes
hosts allow = 127.0.0.1 192.168. 10.
hosts deny = 0.0.0.0/0
read only = no
browseable = yes
public = yes
writable = yes

FEDORA SELINUX ISSUES:

setsebool -P samba_export_all_rw 1

For Windows Shares that require Passwd:

https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server

cat <<'EOF'>/etc/samba/smb.conf
[global]
  workgroup = WORKGROUP
  server string = %h server (Samba, Ubuntu)
  dns proxy = no
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
  server role = standalone server
  security = user
  passdb backend = tdbsam
  obey pam restrictions = yes
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:*        %n\n *password\supdated\ssuccessfully* .
  pam password change = yes
  usershare allow guests = yes

[excel]
  comment = Excel Office-JS AddIn
  path = /opt/excel/xml/geochem
  public = yes
  writable = yes
  available = yes
  browsable = yes
  guest ok = yes
  create mask = 0777
  directory mask = 0777
  hosts allow = 127.0.0.1 192.168. 10. 172.
  hosts deny = 0.0.0.0/0
EOF
SMBUSER=demoUser
useradd -M -s /sbin/nologin $SMBUSER && passwd $SMBUSER && smbpasswd -a $SMBUSER
  • No labels