Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 52

Thread: Ubuntu Server, permissions

  1. #31
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    6,278
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Ubuntu Server, permissions

    Quote Originally Posted by Craig71 View Post
    Yes please! The easier the better!
    im sorry, it's actually not possible to technically have a usernameless and passwordless samba share BUT it can map users to the nobody account and still allow it access. I am not at home at the moment but when I get home i'll post my smb.conf file. I know I use USER level security, which means usernames need to be on the server and the same as on the client, IF that's not possible then you can use guest accounts which map to user nobody and or there is even a way to use a username map file where it maps a certain user from the client to a user on the server. does your Pi have a user on it and password?
    Check out my Blog about my life and computer software and hardware. http://ubuntuaddicted.blogspot.com/
    My YouTube channel:
    http://www.youtube.com/ubuntuaddicted

  2. #32
    Join Date
    May 2012
    Beans
    80

    Re: Ubuntu Server, permissions

    I don't really know if there's a user as such on the Pi. I did create a user for samba called pi - password pi.

    I'm only using XBMC on this pi, so the user may just be XBMC?

  3. #33
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    6,278
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Ubuntu Server, permissions

    Ok, now is there a pi user on your ubuntu samba server?
    Check out my Blog about my life and computer software and hardware. http://ubuntuaddicted.blogspot.com/
    My YouTube channel:
    http://www.youtube.com/ubuntuaddicted

  4. #34
    Join Date
    May 2012
    Beans
    80

    Re: Ubuntu Server, permissions

    Yes, as long as I've done it right. Seems strange it wont connect. Here is a grab of the users:


  5. #35
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server, permissions

    Did you already set the password for pi?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  6. #36
    Join Date
    May 2012
    Beans
    80

    Re: Ubuntu Server, permissions

    Yep. Can't login with either of the other usernames & passwords either.

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

    Re: Ubuntu Server, permissions

    Edit /etc/samba/smb.conf directly and

    In the [global] section of smb.conf find the following lines and put # signs in front of them so they look like this:
    #security = SHARE
    #add machine script = /usr/sbin/useradd -s /bin/false -d /home/nobody
    #winbind use default domain = Yes
    #winbind trusted domains only = Yes
    #path = /media/MediaShare
    #read only = No
    Then go into your share and make it look like this:
    Code:
    [mediaonserver]         
    comment = mediaonmainserver  
    path = /media/MediaShare       
    guest ok = yes
    force user = craig
    read only = no
    Save the file and restart samba:
    Code:
    sudo service smbd restart
    This will create a guest accessible share. You no longer need any users except nobody in the samba database so remove the rest like this:
    Code:
    sudo smbpasswd -x craig
    If done correctly when you run the following command you should only get a listing for "nobody":
    Code:
    sudo pdbedit -w -L
    Now try to access the share. It should not ask for a username and password.

    Note:
    Windows users automatically pass usernames and passwords and if they are not in the samba password database the "map to guest = Bad User" line will convert them to "nobody" automatically because the default guest account is set to "nobody". Linux users will always come across as nobody until they are asked for credentials. The "force user = craig" will insure that anything you save to that share will have the Linux user craig ( which I am assuming is you ) as owner as it converts the user "nobody" to "craig" when saving and accessing files.


    Note2: The "craig" in force user is the Linux user craig. The craig you are removing from smbpasswd is just a reference to him.
    Last edited by Morbius1; January 24th, 2013 at 01:41 AM.

  8. #38
    Join Date
    May 2012
    Beans
    80

    Re: Ubuntu Server, permissions



    Yes! It works! It Works! Thank you so much dude. I only understand around 40% of how you did it - though I do really appreciate the time you've taken to try to explain it.

    I have now got the extra drive, and some more ram for the server, so over the next day or so, I'll be upgrading it.

    A couple of (hopefully last) questions. When I put the new drive in the server, which would be the easiest way to allow the same 'everyone welcome' access you've done her for me? And also, will I need to format the new drive?

    Thanks again mate.

  9. #39
    Join Date
    Dec 2009
    Beans
    5,461

    Re: Ubuntu Server, permissions

    Yes, you will need to format the drive.

    You can use the share definition above as a template for the new partition - just change the path and the share name:
    [mediaonserver2]
    comment = mediaonmainserver2
    path = /media/MediaShare2
    guest ok = yes
    force user = craig
    read only = no
    To have the partition automount you will also need a new entry in /etc/fstab - but that's another topic

  10. #40
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server, permissions

    Quote Originally Posted by Morbius1 View Post
    To have the partition automount you will also need a new entry in /etc/fstab - but that's another topic
    Indeed, but there is some good documentation for it here:
    https://help.ubuntu.com/community/Fstab

    Or the OP could just create a new thread asking about it.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Page 4 of 6 FirstFirst ... 23456 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
  •