Results 1 to 6 of 6

Thread: Sharing Requiring a Password

  1. #1
    Join Date
    Dec 2006
    Beans
    126
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Sharing Requiring a Password

    Ok so basically I have a server(Dell Poweredge 2400) running ubuntu gutsy(too lazy to do the long upgrade to hardy) desktop edition(the server edition was giving me issues so I just did desktop for now, will return to server edition later). It has one main folder that acts as a huge folder share(smb), almost like a network hard drive. It is username and password protected, however there is a folder inside of it I wish to password protect using a different password, and a different username if necessary. I've been looking through this, and I'm not sure which steps I need to take to accomplish it. Thanks in advance.

  2. #2
    Join Date
    Jul 2007
    Location
    Bucharest, Romania
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Sharing Requiring a Password

    If you are using Samba on the server to do the sharing, then one answer would be this. You add to the smb.conf file the following lines:
    Code:
    # let's say that this is how the folder share looks like
    [huge folder]
        comment = "huge folder"
        path = /home/username/huge\ folder
        valid users = users1 ; the username/s of the people that have access to the huge folder
        public = no
        writable = yes
        printable = no
        browseable = yes
    
    # then what you need to add is
    
    [folder inside folder]
        comment = "folder inside folder"
        path = /home/username/huge\ folder/folder\ inside\ folder
        valid users = users2 ; the username/s of the people that will have access to the folder
    # inside the folder
    # warning, these users should be different from the ones that have access to the huge 
    # folder, for if they aren't, they have access to all files and folders inside of the 
    # huge folder, including the folder inside folder
        public = no
        writable = yes
        printable = no
        browseable = yes
    I hope this does the trick for you.

  3. #3
    Join Date
    Feb 2008
    Beans
    1,031

    Re: Sharing Requiring a Password

    Just to tempt you towards the heron light....

    In hardy there is an option to enable guest access to shared folders directly from nautilus's sharing dialog.

    I'm afraid I cannot recall if theres a simple way to get it switched on in gutsy without resorting to the method described above..

  4. #4
    Join Date
    Dec 2006
    Beans
    126
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Sharing Requiring a Password

    now the users that would be accessing the folder within the folder would be using windows machines. For the users do I specify local users on the server or the users from the windows machine accessing the server?

  5. #5
    Join Date
    Dec 2006
    Beans
    126
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Sharing Requiring a Password

    It doesn't seem to be working, if I try to access the share by logging in, it just keeps asking for the password, but the huge folder still works fine...

  6. #6
    Join Date
    Jul 2007
    Location
    Bucharest, Romania
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Sharing Requiring a Password

    Best thing would be to specify users from the server, which you create with the
    Code:
    smbpasswd -a username
    and the you enable the users with
    Code:
     smbpasswd -e username
    After you enter the first one, it asks for a password, which is different from the OS users found in /etc/passwd. This means you have to specify to the users the passwords they will be using.

    There is also a way of having them log in with their Windows credentials, but I suggest against using it as it is time consuming to configure. One easy way would be to create the same usernames and passwords that they have on their computers, assuming at least the usernames are unique.

    Oh, and btw, the logging in to the samba server once you've specified user/s in the valid users field in the smb.conf will only work if you add the usernames and passwords via the smbpasswd command. That's why you couldn't get in.

    And keep in mind that the users that have access to the huge folder should be different from those that have access to the folder inside folder.

    Tell me how it turns up.

Bookmarks

Posting Permissions

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