Solved

Editing a .conf file in linux

Posted on 2013-10-29
3
537 Views
Last Modified: 2013-10-29
Hi,

I'm trying to edit the following on my NAS but not sure how to open and edit.
/usr/syno/etc/smb.conf

I just get an access denied if I just paste it into putty.
0
Comment
Question by:wannabecraig
3 Comments
 
LVL 23

Accepted Solution

by:
savone earned 500 total points
Comment Utility
Try using the vi editor.

vi /usr/syno/etc/smb.conf

You might want to read a little about vi, it can be confusing.

http://www.cs.colostate.edu/helpdocs/vi.html
0
 
LVL 7

Expert Comment

by:SterlingMcClung
Comment Utility
Are you sure you have permission to edit the file?  What user are logging in as?  If you don't have permission and you aren't logged in as the super user, you can try using
sudo

Open in new window

or
sudo su

Open in new window

to gain super user rights.  If you do have the proper permissions, and it is just a matter of which program to use, then it is going to depend on the particular NAS that you are using.  Common file editing programs in Linux include: vi, vim, emacs and nano.  Nano is my favorite, as it has a listing of keyboard shortcuts listed on the screen while you are typing. Many of the other editors, while far superior in capabilities, are very difficult to start using due to odd keystrokes that are required and not well documented on screen.  It has been some time, but I believe all of these can open a file by typenig the executable name followed by the file to edit.  So in your case:
nano /usr/syno/etc/smb.conf

Open in new window

, or
 sudo nano /usr/syno/etc/smb.conf

Open in new window

if you want to run as the super user.

If
0
 
LVL 13

Expert Comment

by:Daniel Helgenberger
Comment Utility
Also, try nano, a console editor which might be installed on your system; a little bit more straightforward than vi:
nano /usr/syno/etc/smb.conf

Open in new window

If you can connect via ssh, then copy the conf to your local system and edit it with a gui text editor:
scp root@<yourNAShostname>:/usr/syno/etc/smb.conf .

Open in new window

Reverse this to copy it back. On windows, use Putty.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now