Ask The Experts

Run VI on 7-Mode Nodes

marshit
3,276 Views

Hello All,

 

So, I have some 7-mode systems I despise. I need to edit the /etc/usermap.cfg file. 

 

 I have SFTP and FTP enable, root has access, no other users setup and suing WinSCP I can't connect for the life me. Then I said, well maybe I can use a Linux node and SSH and then be able to use some Linux commands to edit the file and that didn't work. I went to http://x.x.x.x/na_admin/logs and /na_admin to see if that would get me anywhere and not the /etc/ directory. 

 

What other way can I simply edit the file I need? I don't want to wrfile the entire content. I simply want to comment out some lines.

 

Thanks!

 

2 REPLIES 2

Ontapforrum
3,257 Views

Ssh to filer :

 
1) Filer> rdfile /etc/usermap.cfg
Copy out all content into notepad. Edit it, comment out as you like. Then, write it back using 'wrfile'. Just save the contents of usermap.cfg incase you want to revert it.
 
 
2) Filer> wrfile  /etc/usermap.cfg [ press enter]
 
<Copy paste the entire contents from clipboard >

<press enter>

<press control-c to terminate it>

 
Do rdfile again to check if the changes are correctly reflected. 
 
Note: wrfile can only be used to write the entire/content file.  You can't edit using netapp's wrfile command. If you want to use linux VI editor, its doable, for that you need to mount up the root vol on a UNIX/linux box using NFS. Then you can use vi editor and even do cp to copy the file to your local disk, as a backup copy if you needed to revert it.
 
Thanks!

paul_stejskal
3,167 Views

Unfortunately 7-mode is a bit limited. One thing you could do is export the root volume as a NFS export so you can access the "etc" folder, then just modify the file over NFS.

Public