LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2012, 08:26 AM   #1
Thello
LQ Newbie
 
Registered: May 2012
Distribution: n/a
Posts: 2

Rep: Reputation: Disabled
how do I open a file in nano or vi


how do I open a file in nano or vi or should I used vim

this is what I tried

vi /etc/shadow but nothing happen

then I tried vim /etc/shadow but nothing happen
 
Old 05-19-2012, 08:29 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,126
Blog Entries: 1

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Hi

Try putting
Code:
sudo vi /etc/shadow
 
Old 05-19-2012, 08:40 AM   #3
anil98433
LQ Newbie
 
Registered: May 2012
Posts: 18

Rep: Reputation: Disabled
first login as root then use this to open a file. i think you are logged as local user and this service is disabled by administrator or check the package for these are correctly installed or not.
 
Old 05-19-2012, 08:43 AM   #4
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,429

Rep: Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348
As root, try 'vipw' to edit /etc/passwd or 'vipw -s' to edit /etc/shadow.
 
Old 05-19-2012, 08:47 AM   #5
Thello
LQ Newbie
 
Registered: May 2012
Distribution: n/a
Posts: 2

Original Poster
Rep: Reputation: Disabled
Linux User 551548 thanks it worked
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to create a data file with all entered users information. Nano script editor SANA4SPA Linux - Newbie 5 09-05-2011 01:44 AM
Nano-Open Technology adrianocavalcanti LinuxQuestions.org Member Intro 2 06-16-2010 07:17 PM
Editing sudoers (shows as new file in nano) rushinblue Linux - Newbie 2 11-06-2007 02:17 PM
Geting error loop QFike:getch: File not open QFile:atEnd: this file is not open badgerbox76 Linux - Newbie 6 01-07-2006 06:30 PM
how do i use xtern in my program to open nano please? twirl Programming 3 09-10-2005 02:17 PM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration