1

How to permanently mount samba share with root priveleges? I've used this FAQ but still getting the same error. The point is i don't want to send credentials in plane text.

User credentials file:

username=USER
password=password
domain=sanctuary

smb.conf:

    [global]
    valid users = USER
    browsable = yes
    guest ok = no
    read only = no
    available = yes
    public = no
    writable = yes
    comment = USH
    security = user
    workgroup = Sanctuary
    create mask = 0777
    directory mask = 0777
    unix password sync = yes

    [share]
    comment = archive
    path = /share
    directory mask = 0777
    create mask = 0777

fstab line:

fstab: //192.168.1.50/share /media/share cifs credentials=/etc/samba/user,rw,uid=USER,iocharset=utf8,user,noauto,file_mode=0777,dir_mode=0777 0 0

error:

mount: wrong fs type, bad option, bad superblock on //192.168.1.50/share,
   missing codepage or helper program, or other error
   (for several filesystems (e.g. nfs, cifs) you might
   need a /sbin/mount.<type> helper program)
   In some cases useful info is found in syslog - try
   dmesg | tail  or so

From connect to server menu in nautilus share mounts fine and dandy, but... again no root.

Update:

After simplifying a line in fstab to

fstab //192.168.1.50/share /media/share cifs credentials=/etc/samba/user,uid=1000,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

i get the error:

mount: only root can mount //192.168.1.50/share on /media/share

Update 2

Actually i got share mounted with:

sudo apt-get install cifs-utils

But i still cannot write inside it - is says Permission denied

Update 3 SOLVED

Source of proublem was messed up/non-tweaked permissions

Execute

sudo chmod 777 /share

on server helped.

1 Answer 1

1

I solved it by executing:

sudo chmod 777 /share  

on server.

1
  • I'm going to undelete this because it is in fact the answer to the question.
    – Seth
    Jan 15, 2015 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.