Can't save config file changes.

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
davidblaine

Can't save config file changes.

Post by davidblaine »

I'm trying to set up samba sharing and edit the samba.conf file. I keep getting an error message saying I don't have permission to save the file.

I probably screwed something up. I went into terminal and typed the command sudo su, so I was in root, but that didn't help. I still get the same message when trying to save changes. All I'm trying to do is change the line that says "security=users" to "security=share" but I can't.

Anyone have any idea why I might not be able to do this now? Thanks in advance.

You're help in this forum is tremendous. It's a steep learning curve, but worth it I think.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Fornhamfred
Level 6
Level 6
Posts: 1243
Joined: Wed Oct 31, 2007 3:38 pm
Location: Suffolk UK

Re: Can't save config file changes.

Post by Fornhamfred »

David

The file you are trying to edit is a root file and there are two ways to edit it. The terminal way is if you have a root password type su, type in password, then at the root prompt type gedit and the editor will open. Open root directory and find the etc directory and then samba and samba.conf. You can then edit the file and save.
Alternately using the gui method, log out of user and open a new session as root, then with the nautilus find the file and edit it. Finally log back in as user.

Hope you can follow this.

Fred
MagnusB
Level 6
Level 6
Posts: 1252
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Can't save config file changes.

Post by MagnusB »

Root account is disabled by default unless you activated it. So you have to use (in terminal):

Code: Select all

sudo gedit /path/to/file
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
davidblaine

Re: Can't save config file changes.

Post by davidblaine »

Damn, that worked slicker than snot. And I googled for an hour trying to find the answer to that!

You guys are better than good!

BTW, I used the last method, sudo gedit /etc/samba/smb.conf

Thanks much!
MagnusB
Level 6
Level 6
Posts: 1252
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Can't save config file changes.

Post by MagnusB »

Yeah, I do not recommend opening a root filemanager, just makes more sense to just open the file as root. Glad you found the solution, these things are so basic many people forget to include it, and it can be damned hard to understand if you are a newbie (I know I had some issues with this) :)
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
Locked

Return to “Beginner Questions”