Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 44

Thread: Configuring Samba

  1. #31
    Join Date
    Apr 2011
    Location
    Santiago (Dominican Rep)
    Beans
    311
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Configuring Samba

    Don't apologize since the smbpasswd is one of the rare occasions where you need the CLI
    Desktop: P-IV 3.2gHz, RAM= 1.5GB, Disk=80GB+500GB, LCD=22", Bought 2012 $90
    File Server: P-III 650mHz, RAM = 384MB, Disks 240 + 300GB, Bought 2005 $60
    File Server HP Vectra VL8i SFF, 2 cables connected: Ethernet and Power

  2. #32
    Join Date
    Dec 2012
    Beans
    38

    Re: Configuring Samba

    Oh for the love of god , I am having a love hate relationship with Ubuntu . Allmost losing my hair now

    I decded to re-install Ubuntu , due to a hardware upgrade and have stumbled at this hurdle again


    All im trying to acheive, is to share folders over the Lan on my Ubuntu 12.10 x64 machine , so my windoze PCs can access my files

    Now I managed to install Samba , however the GUI will Not launch , I double click it and nothing happens

    I have run opened and added shares (texts/scripts) at the bottom of my samba.conf file . However My windoze pc cannot open the share files .
    I've also tried changing the permissions on folders and partitions but errors appear, I get the 'Could not change the permissions of folder' error

    This is supposed to be simple and I am just finding this hard

    Any suggestions ? I have followed the guides and done the steps , please help

  3. #33
    Join Date
    Dec 2009
    Beans
    5,542

    Re: Configuring Samba

    I really don't know why you are following any guides. All you needed to do is:

    [1] Make believe you were sitting in front of a WinXP machine.
    [2] Open your file manager, right click a folder, and select "Sharing Options"
    If you didn’t have Samba installed it would have installed it for you.

    Anywho, by now you should realize what you need to do next ..... Please post the output of the following commands:
    Code:
    testparm -s
    Code:
    net usershare info --long

  4. #34
    Join Date
    Dec 2012
    Beans
    38

    Re: Configuring Samba

    I really don't know why you are following any guides. All you needed to do is:

    [1] Make believe you were sitting in front of a WinXP machine.
    [2] Open your file manager, right click a folder, and select "Sharing Options"
    If you didn’t have Samba installed it would have installed it for you.
    I want to share a drive partiton though I cannot even create a folder on the EXt 4 partition for some reason , neither can I get to any kind of Sharing options . I am confused . When I right click the drive , go to properties I sharing options ,however all is not smooth - See attached pictures

    Please post the output of the following commands:
    Code:
    testparm -s
    Code:
    net usershare info --long
    testparm -s;

    Code:
    joe@Homeserve:~$ testparm -s
    Load smb config files from /etc/samba/smb.conf
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    Processing section "[printers]"
    Processing section "[print$]"
    Processing section "[share]"
    Processing section "[share]"
    Processing section "[sharedfolder]"
    Loaded services file OK.
    WARNING: 'workgroup' and 'netbios name' must differ.
    Server role: ROLE_STANDALONE
    [global]
        workgroup = HOMESERVE
        server string = %h server (Samba, Ubuntu)
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        unix password sync = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        usershare allow guests = Yes
        panic action = /usr/share/samba/panic-action %d
        idmap config * : backend = tdb
    
    [printers]
        comment = All Printers
        path = /var/spool/samba
        create mask = 0700
        printable = Yes
        print ok = Yes
        browseable = No
    
    [print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers
    
    [share]
        comment = Big Drive
        path = /dev/sda4
        read only = No
        create mask = 0755
        guest ok = Yes
    
    [sharedfolder]
        path = /home/joe/sharedfolder
        valid users = USERNAME
        read only = No
        guest ok = Yes
    joe@Homeserve:~$
    The following command did nothing , just a blinking cursor
    net usershare info --long
    Attached Images Attached Images
    Last edited by 90Ninety; January 19th, 2013 at 03:14 PM.

  5. #35
    Join Date
    Dec 2009
    Beans
    5,542

    Re: Configuring Samba

    [1] Sharing Options looks like the attachment below. If you don't have it's because you don't have something installed which should have been placed there by default when you originally installed your system. Don't worry about it - at this point it's not worth fixing.

    [2] You can't share /dev/sda4. This will never work:
    [share]
    comment = Big Drive
    path = /dev/sda4
    read only = No
    create mask = 0755
    guest ok = Yes
    It's not a sharable entity. You have to mount the partition to a real mount point. This brings up a whole other set of questions:

    Please post the output of each of the following commands:
    Code:
    cat /etc/fstab
    sudo blkid -c /dev/null
    mount
    Attached Images Attached Images
    Last edited by Morbius1; January 19th, 2013 at 05:22 PM.

  6. #36
    Join Date
    Dec 2012
    Beans
    38

    Re: Configuring Samba

    joe@Homeserve:~$ cat /etc/fstab
    UUID=cac8f8f3-62bc-448d-ba11-d516771cd456 / ext4 defaults 0 1
    UUID=965799b0-b889-4163-8fe1-e33c6be5b2b0 swap swap sw 0 0
    joe@Homeserve:~$ sudo blkid -c /dev/null
    [sudo] password for joe:
    /dev/sda1: UUID="cac8f8f3-62bc-448d-ba11-d516771cd456" TYPE="ext4"
    /dev/sda3: UUID="2d06b42c-15b5-4063-b1cf-b8b3b8f473a6" TYPE="ext4"
    /dev/sda4: UUID="2006fbe6-1993-4c74-b7d5-80197cafbdb0" TYPE="ext4"
    /dev/sda5: UUID="965799b0-b889-4163-8fe1-e33c6be5b2b0" TYPE="swap"
    joe@Homeserve:~$ mount
    /dev/sda1 on / type ext4 (rw)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
    gvfsd-fuse on /run/user/joe/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=joe)
    joe@Homeserve:~$

  7. #37
    Join Date
    Dec 2009
    Beans
    5,542

    Re: Configuring Samba

    Let's say you really want to share the partition designated as /dev/sda4.

    [1] Create a mount point for sda4 to live in:
    Code:
    sudo mkdir /media/Data
    [2] Add a line to the end of /etc/fstab:
    Code:
    UUID=2006fbe6-1993-4c74-b7d5-80197cafbdb0 /media/Data ext4 defaults,noatime 0 2
    [3] You do not have the partition mounted so use the following command which will test for errors and if there are none mount /dev/sda4 to /media/Data:
    Code:
    sudo mount -a
    [4] Now Fix your smb.conf from this:
    [share]
    comment = Big Drive
    path = /dev/sda4
    read only = No
    create mask = 0755
    guest ok = Yes
    To This:
    [share]
    comment = Big Drive
    path = /media/Data
    read only = No
    create mask = 0755
    guest ok = Yes
    And restart samba:
    Code:
    sudo service smbd restart
    Whether or not you or the samba client guest can actually write to the mounted partition is entirely dependant of what the Linux permissions are on the mounted partition. You can find that out by running the following command:
    Code:
     ls -dl /media/Data
    Don't do that if the partition is not mounted. Do that only after the partition is mounted.

  8. #38
    Join Date
    Nov 2006
    Location
    Gurgaon, India
    Beans
    198
    Distro
    Ubuntu Studio 13.04 Raring Ringtail

    Re: Configuring Samba

    just wanted to say thanks guys you have saved me a tun of searching and reading.

    Just a friendly suggestion. I think someone should right a manual for samba like the one given in https://help.ubuntu.com/12.10/server...ileserver.html but not so technical a more newbie thing.Though i got through it due to my courses in btech.

  9. #39
    Join Date
    Dec 2012
    Beans
    38

    Re: Configuring Samba

    Ok I had done the steps , though I do not think this is the solution . It seems I do not own permissions of the partitions (for whatever reason)
    As you can see from the attached screen shot on the media/joe/1.2TB partition properties window , permissions tab 'you are not the owner , so you cannot change the permissions '( strangely the code 2006fbe6-1993-4c74-b7d5-80197cafbdb0 given to the partition)
    This is my second Ubuntu installation in a week, ive spent hours scouring the net for soluton for file sharing and Im still none the wiser

    how do I get the permissions back ?
    Last edited by 90Ninety; January 19th, 2013 at 10:57 PM.

  10. #40
    Join Date
    Dec 2009
    Beans
    5,542

    Re: Configuring Samba

    Ok I had done the steps , though I do not think this is the solution
    If you had done those steps then this line is in fstab:
    UUID=2006fbe6-1993-4c74-b7d5-80197cafbdb0 /media/Data ext4 defaults,noatime 0 2
    And this is your share definition in /etc/samba/smb.conf:
    [share]
    comment = Big Drive
    path = /media/Data
    read only = No
    create mask = 0755
    guest ok = Yes
    You have either run the "sudo mount -a" and "sudo service smbd restart " commands or in your case rebooted the box.
    As you can see from the attached screen shot on the media/joe/1.2TB partition properties window , permissions tab 'you are not the owner , so you cannot change the permissions '( strangely the code 2006fbe6-1993-4c74-b7d5-80197cafbdb0 given to the partition)
    [1] There should be no /media/joe/1.2TB it's now /media/Data - See above. You either didn't do the steps above, didn't restart the services, or didn't reboot your box.

    [2] The permissions issue was already addressed:
    Whether or not you or the samba client guest can actually write to the mounted partition is entirely dependant of what the Linux permissions are on the mounted partition. You can find that out by running the following command:
    Code:
     ls -dl /media/Data
    Don't do that if the partition is not mounted. Do that only after the partition is mounted.
    [3] The screenshot shows you trying to share the partition using the sharing tab - you no longer have to do that it's already shared in smb.conf.

    If I wanted to be reckless I would suggest doing a :
    Code:
    sudo chown joe /media/Data
    But I no longer know:

    ** If it's really mounted to /media/Data as you stated above.
    ** What's in sda4 - If it's another operating system a chown will mess everything up.

Page 4 of 5 FirstFirst ... 2345 LastLast

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
  •