Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22
I cant seem to correctly map a drive to Samba. I am able to access the folders and open them. However, I cannot write or edit. I am using "net ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    12

    Map Windows drive to Samba


    I cant seem to correctly map a drive to Samba. I am able to access the folders and open them. However, I cannot write or edit. I am using "net use x:\\ipadress\var\www user:'username' 'password' and I map it this way I can connect. But when I map it "net use x:\\ipadress\'Sharename' I get incorrect network password. Not sure if this has something to do with it. Here is my Samba.conf file

    ======================= Global Settings =====================================
    [global]
    log file = /var/log/samba/%m.log
    load printers = yes
    smb passwd file = /etc/samba/smbpasswd
    guest account = mfitzpatrick
    passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*success fully*
    obey pam restrictions = yes
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    write list = mfitzpatrick
    username map = /etc/samba/user.map
    null passwords = yes
    encrypt passwords = yes
    public = yes
    passwd program = /usr/bin/passwd %u
    dns proxy = no
    writeable = yes
    printing = cups
    server string = Samba Server
    delete readonly = yes
    unix password sync = yes
    workgroup = 'SEVERNAME'
    os level = 20
    force user = mfitzpatrick
    valid users = mfitzpatrick
    printcap name = /etc/printcap
    security = user
    create mode = 777
    max log size = 0
    pam password change = yes
    directory mode = 777

    #============================ Share Definitions ==============================
    [Trike]
    writeable = yes
    printable = no
    path = /root/var/www
    create mask = 0777
    comment = this should work
    valid users = mfitzpatrick
    public = no
    security = user

  2. #2
    Just Joined!
    Join Date
    May 2009
    Posts
    13
    what is the output of:

    ls -la /root/var/www

    Its possible that your local permissions on the box arent letting samba write to that dir

    What user is samba running as?

  3. #3
    Just Joined! calix's Avatar
    Join Date
    Apr 2006
    Posts
    9

    I see an issue

    Well, one issue I see is that your share is in the root users home directory. In order for your mfitzpatrick user to have access to the share that user will need root access, which if that is the case is a bad idea.
    I am also assuming you have added mfitzpatrick as a samba user by issuing a
    Code:
    smbpasswd -a mfitzpatrick
    Most likely it is a permissions issue on the files themselves.

  4. #4
    Just Joined!
    Join Date
    Nov 2007
    Posts
    26
    The first question I have to ask is, what version of Windows. I've got no trouble reading writing or creating files between Winows XP Pro and/or Vista (I think) with my Ubuntu machine. The Vista machine was "upgraded" to Windows 7 Home Premium, and all went to garbage.

    With much screwing around, I can mount, read and write to a Win7 drive as a guest, but can't overwrite - big problem for rsync.

    Using the Places->Network or Places->Connect to Server hangs up on the "password", even thought I set and know the password and have a user account on the Win7 machine.

  5. #5
    Just Joined!
    Join Date
    May 2009
    Posts
    13
    Quote Originally Posted by calix View Post
    Well, one issue I see is that your share is in the root users home directory. In order for your mfitzpatrick user to have access to the share that user will need root access, which if that is the case is a bad idea.
    I am also assuming you have added mfitzpatrick as a samba user by issuing a
    Code:
    smbpasswd -a mfitzpatrick
    Most likely it is a permissions issue on the files themselves.

    Not nessecarily, the fact that the user can log in and map the drive would suggest he has his smbpassword sorted out. The user doesnt nessecarily need root access, as you can set a group level permission on that folder to include the user he is trying to access the folder with.

    Which brings me back to my earlier question

    Whats your ls -la of the folder on the linux box that your trying to share?

  6. #6
    Just Joined!
    Join Date
    May 2009
    Posts
    13
    Quote Originally Posted by ImChipBrown View Post
    The first question I have to ask is, what version of Windows. I've got no trouble reading writing or creating files between Winows XP Pro and/or Vista (I think) with my Ubuntu machine. The Vista machine was "upgraded" to Windows 7 Home Premium, and all went to garbage.

    With much screwing around, I can mount, read and write to a Win7 drive as a guest, but can't overwrite - big problem for rsync.

    Using the Places->Network or Places->Connect to Server hangs up on the "password", even thought I set and know the password and have a user account on the Win7 machine.
    He's trying to access a samba share running on a linux server from a windows PC, not a share on a windows pc from a linux box.

  7. #7
    Just Joined!
    Join Date
    May 2010
    Posts
    12
    I have created my user name/password inside Samba however, I don't see where I can elevate permissions for a user. Where would I change the permissions on the box to allow SAMBA to write to it? I'm using Windows XP.

  8. #8
    Just Joined!
    Join Date
    May 2010
    Posts
    12
    Quote Originally Posted by zindello View Post
    what is the output of:
    ls -la /root/var/www
    This is the ls -la of the file im trying to edit. But I cannot edit any file or write to this folder. All I seem to have is veiw/list and read

    -rwxrwxrwt 1 mfitzpat root 64070 May 25 02:15 trikes.txt

  9. #9
    Just Joined!
    Join Date
    Nov 2007
    Posts
    26
    I have a directory /home/steve

    I go to Places->Computer

    I see an icon for Filesystem and click it. There I see all the guts, including a Home folder. I click that and see steve. I right-click that and I get two chances to share the folder; one on the menu itself and one on the Permissions tab. I share the folder with a sharename stevelinux and allow others to read and write. I share everything below. From an XP, I can't see the guts (/etc /var /sbin) directories, but I can read and write to stevelinux. From the XP machine, my linux username and password works.

    I have an XP install on the same drive/different partition - NTFS. I mount this in fstab.

    /dev/sda1 /media/XP ntfs defaults,rw 0 0

    I'll leave it to others to explain, but the /media directory is part of the "guts" XP can't see, but it can see the folder named XP under /media. I checked, and the owner is root, the share tab shows no checkmarks, but I'm able to read and write to this from both Ubuntu and from XP on a networked machine running XP.

  10. #10
    Just Joined!
    Join Date
    May 2010
    Posts
    12
    Quote Originally Posted by ImChipBrown View Post
    I have a directory /home/steve
    I go to Places->Computer
    Sounds like this would fix my issue I think... Except I cant find 'Places' or 'Computer' or 'Filesystem'

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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