Can't save config file changes.

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Can't save config file changes.

Postby davidblaine on Sun Mar 09, 2008 1:54 pm

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.
davidblaine
Level 1
Level 1
 
Posts: 20
Joined: Wed Feb 27, 2008 9:02 pm

Linux Mint is funded by ads and donations.
 

Re: Can't save config file changes.

Postby Fornhamfred on Sun Mar 09, 2008 3:09 pm

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
Fornhamfred
Level 6
Level 6
 
Posts: 1131
Joined: Wed Oct 31, 2007 3:38 pm
Location: Suffolk UK

Re: Can't save config file changes.

Postby MagnusB on Sun Mar 09, 2008 7:59 pm

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
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Can't save config file changes.

Postby davidblaine on Mon Mar 10, 2008 7:47 am

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!
davidblaine
Level 1
Level 1
 
Posts: 20
Joined: Wed Feb 27, 2008 9:02 pm

Re: Can't save config file changes.

Postby MagnusB on Mon Mar 10, 2008 10:15 am

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
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway


Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], flieger, glhallway, Google [Bot], NerdcoreSteve, Reorx and 40 guests