• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 569
  • Last Modified:

Editing a .conf file in linux

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
wannabecraig
Asked:
wannabecraig
1 Solution
 
savoneCommented:
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
 
SterlingMcClungCommented:
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
 
Daniel HelgenbergerCommented:
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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now