Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to set up samba on my arch arm box, for shares that I can access from various places but I can't seem to get it right;

What I'm after is the following:

Users:

  1. Log-in with system user acccounts
  2. Users get their home directory
  3. Users get the media directory
  4. Users get read/write to media directory

Guest:

  1. Guest is restricted to media directory
  2. Guest gets read only of media directory

Root:

  1. Root starts in /
  2. Root gets read/write

For some reason, the shareuser can see the root directory, so i set valid user to root, but then i can't log in to it even with root account.

I'm not too up on this Samba stuff so any help would be appreciated.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you want root to have access to the whole file-tree, add a share [everything] with path = / and use that instead of setting root's home directory to /. For the media folder to be writable, add a group called sambausers (or use an existing group) and add users to that group with usermod -a -G sambausers username. You will have to check that the shared path has group write permissions enabled (chmod 775 /path/media).

/etc/samba/smb.conf (significant parts)

[global]
   security = user

[media]
      comment = Media folder
      path = /mnt/media
      #valid users = jaroslav
      public = yes
      read only = yes
      guest ok = yes
      guest account = nobody
      write list = @sambausers
      printable = no
      browseable = yes

[homes]
      comment = Home Directories
      browseable = no
      writable = yes
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.