Samba

From Hackepedia
Revision as of 22:08, 25 October 2007 by Franks (talk | contribs)
Jump to navigationJump to search

To see who is in a specific windows workgroup, assuming the default workgroup name WORKGROUP

# nmblookup WORKGROUP

Install on a Debian based system

$ sudo apt-get install samba

I wanted to install samba without printing and the extra functionality, I solely wanted it for remote directories. My wrokgroup is WORKGROUP and my shared directory which has the proper permissions set is /usr/fileshare:

$ cat /etc/samba/smb.conf
[global]
  workgroup = WORKGROUP
  server string = %h server (FileServer2000)
  dns proxy = no
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
  security = user
  encrypt passwords = true
  passdb backend = tdbsam
  obey pam restrictions = yes
  invalid users = root
  passwd program = /usr/bin/passwd %u
  passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
  socket options = TCP_NODELAY
  printcap name = /dev/null
  load printers = no
  printing = bsd
[fileshare]
  comment = A place to store stuff
  path = /usr/fileshare
  read only = no
  public = yes

I then created a user to access the samba share:

$ sudo smbpasswd -a franks
$ sudo /etc/init.d/samba restart

and to be safe I watched the logs as I tested, which are in /var/log/samba.