What's new

Root User Samba Access

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Empassant18

Occasional Visitor
I am sorry for posting this, as I have seen some information on this forum and elsewhere about how to do this, but it has to be an easy way to accomplish this. I would like to access my Samba shares with the root login. It just won't work, and I think there is a setting that allows this to happen. It's most important because when the system writes files to my USB disk (such as with Transmission), I am unable to delete the files with a new user I created in the UI that has RW access to the shares. In other words, I can add files and delete them if the secondary user creates them from the Samba share, but if Transmission creates the file, I cannot delete it.

I imagine a couple of solutions. First, enabling the root Samba user. Second, should I look into changing the permissions on the drive to give the secondary user root access? I could use some help here or link to the article that helps with this issue. Thanks to this community for your support. I try only to post after I have really looked around, and I have run out of time looking over the last couple of days. Thanks.
 
Use the admin user and password set for the router. Same as root...

Sent from my SM-T380 using Tapatalk
 
What doesn't work? How are you testing this and what error messages are you getting?

I am in a macintosh environment. I set up SMBv2 on router with Simpler Share Naming and Master Browser ticked "yes", WINS server, "no." I have two shares set up on my USB drive. The root user is there by default and has RW access. Ideally, I would like to use that user to access the shares on my network, but I also have a secondary user set up that has no problem accessing the shares but does not have root delete privileges from the network (system created files won't delete - Transmission).

When I try to access with the root user, it does not even allow me a chance to get an error. The login window persists with no ability to log into the server. I read somewhere that Samba deactivates the root user by default. Is that what's going on and how can I change that? The secondary user logs in just fine but no root privileges.
 
What is the underlying disk format of the USB storage device, FAT32, NTFS, ext2, hfs, etc.?
 
I suspect the problem is that the shared directory wasn't created through the router's Samba GUI and therefore has the wrong permissions. So to correct that do the following.

Assuming the device name is VERBATIM and the shared directory name is ASUS, log into the router via SSH and issue the following command:
Code:
chmod 777 /tmp/mnt/VERBATIM/ASUS

I don't know why you can't connect using the root account. It works OK for me, but I'm not a Mac user.
 
Thanks for the advice. When I issue that command on the share directory, login again, and try to delete with the secondary user, I get this message, "The operation can’t be completed because you don’t have permission to access some of the items."

Is anyone else having this problem? Other macintosh users out there?

Thanks
 
You might have the same permissions problem if you are trying to delete items in subdirectories that also weren't created through Samba.

Take a sledgehammer approach to it with the following command:

Code:
chmod -R 777 /tmp/mnt/VERBATIM/ASUS
 
You might have the same permissions problem if you are trying to delete items in subdirectories that also weren't created through Samba.

Take a sledgehammer approach to it with the following command:

Code:
chmod -R 777 /tmp/mnt/VERBATIM/ASUS

That worked!! Thanks for being so responsive! I really appreciate the help.

For others out there watching, I am still having the root login issue on Macintosh. Any ideas what's going on?
 
That worked!!
I don't use Transmission myself but I suspect you will have the same problem reappear when Transmission starts creating new files and directories. A quick search suggests that the "umask" value that Transmission uses by default is 022 (18 in decimal). I suggest that you change that to 000 in Transmission's settings.json file:
Code:
    "umask": 0,
 
I don't use Transmission myself but I suspect you will have the same problem reappear when Transmission starts creating new files and directories. A quick search suggests that the "umask" value that Transmission uses by default is 022 (18 in decimal). I suggest that you change that to 000 in Transmission's settings.json file:
Code:
    "umask": 0,

This is a good tip! Done and done. Thanks.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top