View Single Post
Old 01-24-2013, 07:58 AM
teetee1 teetee1 is offline
L6: Expert
  • Sep 2006
  • 1,886
  • 901 teetee1 is a splendid one to behold
Quote from Zank View Post :
ok so the samba repo seems to be down as per my rpevious post but i did run the commands you mentioned after doing the install again.

(To long to quot)

In the above file it says force user=root but in the samba wiki it says to create a user pcguest.
what will my login password be for the samba shares? login pcguest and password blank? (I dont mind the blank password).
Let me see if I'm clear with your setup. You have Transcend 1GB thumb drive as your /dev/sda1 system drive (not sure if it's enough - I think 2GB is the minimum space to do anything. You can do a quick check by using the following command:
# df -h
and see how much is still available on "/" (rootfs).

You also have a 4-bay USB enclosure with JBOD setting, 3x2TB drives (/dev/sdb1,sdc1,sdd1) with MBR partition scheme and 1x2TB drive with a tiny GPT partition and a large ntfs partition (/dev/sde2 for storage)

Here is the smb.conf I would use (make sure samba is installed and `systemctl restart smbd nmbd` works, the folders /mnt/DISK1 and the rest are created first):

security = user
dos charset = ASCII
workgroup = WORKGROUP
server string = ALARM
syslog = 0
log file = /var/log/samba/log.%m
max log size = 50
os level = 65
preferred master = Auto
dns proxy = No
create mask = 0777
directory mask = 0777
path = /mnt/DISK1
read only = No
path = /mnt/DISK2
read only = No
path = /mnt/DISK3
read only = No
path = /mnt/DISK4
read only = No

Set up a samba user account by using smbpasswd command,
# smbpasswd -h
will show you what parameters to use. I would use -a and -n to create a user account to access those drives without having to put in passwords. You probably will need to use the existing system user account (one of the users in /etc/passwd) as your samba user account. The default samba password database files are stored in /etc/samba/private/

Restart samba and try to access the shared folders from one of your samba clients. The share path would be something like smb://username@alarm/DISK1

Permission and security warning:
1. one should never use root as a user to access shared files/folders
2. better to have password (or have open doors for crawler malware / viruses)
3. since the mounted drives are originally owned by root.root, you probably need to either set the folders(/mnt/DISK1) world-writable (777) or change ownership (chown command) of the folder to your samba user account (I never tried it on ntfs filesystems drive) to allow the user accessing samba has the permission to write data on the drives through samba.