4

I've set up samba on raspbian Jessie, and I am able to get to the "pi" user's folder from a windows box.

I want to be able to get to the /etc/ directory from windows because I want to edit conf files in the warm bosom of notepad instead of using nano. I've set up the below with the path specifically pointing at /etc and with just /.

[root]
   read only = no
   locking = no
   path = /etc
   guest ok = yes

and I gave All users write access to the /etc folder with chmod. I can see the \\raspberrypi\root share in windows, and it prompts me for my credentials. but then it says it's not accessible, because either I don't have permissions, or I have another connection to the server with a different username.

I've searched around the internet for this, but it's difficult searching for "raspbian etc" because every configuration tutorial in the world seems to involve the /etc folder.

Bex
  • 2,929
  • 3
  • 26
  • 34
Curtiss
  • 41
  • 1
  • 1
  • 2

4 Answers4

1

Assuming that you are using Notepad++ to edit the said files, setting up samba is just overkill. There is a plugin in Notepad++ called nppFTP which you can use to login to the Raspberry Pi over SFTP and then edit and save any file in /etc or any directory for that matter. For an added bonus, you could setup ssh key based authentication for the root user so that you can login to SFTP with the root user and not have to change permissions in /etc directory.

Ameer
  • 435
  • 3
  • 11
0

I have my root folder shared on my Pi. My config is a bit different than yours:

[root]
    comment = root
    path=/
    browseable=YES
    writeable=YES
    valid users= pi, root
    only guest=no
    create mask=0777
    directory mask=07777
    public=no
    force user = root

valid users makes it so that the user pi and the user root have permission to access /. force user makes it so that all files written over smb will be done be root, even though pi can still write files, it will look like root did it.

Make sure you do:

sudo smbpasswd -a pi and sudo smbpasswd -a root

after you edit this file, so you can set a password for both users.

NOTE: Never allow guest/public access to your root folder, it's not only outrageously insecure, but it's probably bad practice to broadcast your entire filesystem to anyone with a computer in the area.

Patrick Cook
  • 6,365
  • 8
  • 38
  • 63
0

I would have used Filezilla (SFTP graphically) and then copied, backed up, edited and sent back the update.

Andy Anderson
  • 649
  • 1
  • 4
  • 11
-1

Change the path of the directory to / so you can access every thing