Solved

Editing a .conf file in linux

Posted on 2013-10-29
3
543 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
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

803 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