?
Solved

Editing a .conf file in linux

Posted on 2013-10-29
3
Medium Priority
?
552 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Accepted Solution

by:
savone earned 2000 total points
ID: 39609441
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
ID: 39609455
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
ID: 39609457
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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

764 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