LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-22-2012, 09:41 PM   #1
OAFC_Rob
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
samba issues


Hi

I am trying to set samba up and following this guide http://www.bilot.com/?p=510 i'm on vi /etc/samba/smb.conf but it has gone horribly wrong.

I click ENTER get into insert mode put in the content and then hit ESC, followed by :wq but I'm getting the following error message /etc/samba/smb.conf'' E212: cant open file

I think I might have accidently deleted, or removed the file or summat, actually I have no idea because I can't seem to quit at all!!

Any help is greatly appericated!!
 
Old 07-02-2012, 12:48 PM   #2
mgai7755
Member
 
Registered: Apr 2011
Posts: 51

Rep: Reputation: 10
Quote:
Originally Posted by OAFC_Rob View Post
Hi

I am trying to set samba up. i'm on vi /etc/samba/smb.conf but it has gone horribly wrong.
To force quit, use <ESC>q! (note the exclamation point telling it to do it NOW and not asking questions)

Try to use nano or any humanly usable editor. Vi is evil :-)

Also don't forget that some configuration file cannot be altered without being a sudoer. I mean : type sudo before the command to become root.
 
Old 07-02-2012, 04:50 PM   #3
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by mgai7755 View Post
To force quit, use <ESC>q! (note the exclamation point telling it to do it NOW and not asking questions)

Try to use nano or any humanly usable editor. Vi is evil :-)

Also don't forget that some configuration file cannot be altered without being a sudoer. I mean : type sudo before the command to become root.
The file was more than likely locked by a process other than yourself or your running into a permissions issue. Exit the file with the q! command provided and make sure to edit it as the root user.

In regards to the nano comment, that is your opinion and shouldn't be stated as fact. I personally hate nano and only do my file editing in vi/vim. You could also use emacs as it can be a bit more user-friendly for a first time user. However, all of these will do the job.


Here is a halfway decent vi cheat sheet I found by doing a quick google. I have one that I created and have it hung up on a wall next to my desk as remembering all of it would make me crazy.

http://media.smashingmagazine.com/wp...-01-large2.jpg
 
Old 07-02-2012, 05:59 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
It does indeed sound like a permissions issue.
You'll need to get into root user either directly
Code:
su -
and give root passwd, or use sudo
Code:
sudo su -
and give your own passwd.
Always backup a file before editing.

As above, editors are a matter of personal choice, although I will point out that vi has been the default guaranteed-to-be-installed editor on just about all forms of *nix for years if not decades now (inc rescue situations).
Well worth learning the basics just in case your favourite other editor is not available.

Personally I'm happy to stick with vi/vim ..
 
Old 07-04-2012, 04:08 PM   #5
OAFC_Rob
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
I managed to escape the program eventually, I had issues with the firewall on samba so i have turned it off while I get it up and running. I have created a samba user called rob and now on my windows 7 machine i'm putting in \\192.168.215.162\rob comes up with the windows login and tell me to enter the password which I do but nothing happens just tells me that the password is wrong any ideas??
 
Old 07-04-2012, 08:46 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Did you enter the password into smbpasswd?

The most helpful Samba reference I have found is Samba by Example.
 
Old 07-05-2012, 02:37 PM   #7
OAFC_Rob
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Okay I realised I didn't have selinux set to disable, I have now done this restarted samba and it works. By this I mean I saved a file test.txt with test in notepad on windows to my linux machine. I then opened in linux ls -la vi test.txt and inserted a few more lines of rubbish and opened in notepad. All works beautifully!!

However, I did the follow command

ln -s /var/www httpd

To symbolically link the /var/www file with a new folder called httpd however I cannot access this via windows any ideas???
 
  


Reply



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
Possible Samba Issues Woodsman Slackware 2 10-30-2006 03:41 PM
Samba and XP issues scrupul0us Slackware 11 01-07-2006 09:55 AM
Samba issues trebek Linux - Networking 3 04-28-2005 03:10 PM
samba issues feldux Linux - Networking 1 08-12-2004 11:06 AM
Samba Issues jetfanroy Linux - Newbie 10 07-29-2003 08:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 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
Open Source Consulting | Domain Registration