Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Copy numerous private Samba-shares as one user. (Syntax question)

    Hello Forum,

    I have to copy a fileserver (Ubuntu 8.04 32 with Samba) to another server via Internet. I have no problem with the shared (Samba)folders, but are struggling with the private ones.

    And my question is this:

    When adding users to the Samba-server i follow this procedure:

    • Create a user in Linux and add password to user.
    • Create user in Samba and add same password.
    • Edit /etc/samba/smb.conf by adding the new username to the shared folders.

    I have configured Samba to, in this process, also create a private share for each linux-user one the server. This is done by the following "code" in /etc/samba/smb.conf:

         browsable = no
         writable = yes
         path = /home/private/profiles
         guest ok = no
         comment = User Profiles
         valid users = %u
         create mode = 0600
         browsable = no
         directory mode = 0700

    How do I add myself as one of the valid users?
    (By doing that I hope to be able to copy every folder in one batch.)
    I can of course go around the problem by allowing guests, but I don't want to if I don't have to.

    I appreciate any response here.


  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    If you just want read access, then it might be enough to just add your username to the 'valid users' line, but without testing this I'm not sure if the restrictive Linux permissions (directory mode=700) might get in the way - if they do then you might have to back those off to 740 (that's drwxr-----). Also, you really ought to do this as a special backup user rather than as yourself.

    It might even be wise to do this on the server itself using a bash script run by cron, using only the Linux file permissions to be able to read and gzip the file before scp'ing it elsewhere.
    Linux user #126863 - see

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts