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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
11-22-2004, 05:20 PM
|
#1
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Rep:
|
starting smb services failed...
Hi,
I'm having a problem with samba. This is the first time I've tried to configure it and it works fine logged in as root.
I just type samba start and it starts up fine.
Then when I login in my user account i type samba start and I get a path error - command not found.
Someone guided me through fixing that with something else so I added the following to my ~.bash_profile file
Code:
export PATH=$PATH:usr/sbin
That seemed to fix the path problem and I could then type samba start.
However I now get the following message when I type samba start in a terminal...
Code:
Starting SMB services: smbd: Version 2.0.10-ja-1.1 : Must have effective user id of zero to run.
[FAILED]
Starting NMB services: [OK]
Anyone know how to fix this one?
When I login as root it starts up fine.
Is there a permission on a file somewhere that needs to be changed? That's the only reason I can think of as to why it works as root and not as a normal user - though I am completely new to Linux.
Any help will be greatly appreciated.
Thanks
Ben
|
|
|
11-22-2004, 07:27 PM
|
#2
|
Member
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620
Rep:
|
The path fix is probably a bad idea, why? Because in most cases Samba and most all services should only be run by root. In fact the programs in the '/sbin' directory should only be run by root.
If you want to run samba as non root, you must enable it as a service. Usually RH allowed you to run '/etc/init.d/smb start' (as root). Look into 'chkconfig' and the 'service' command.
|
|
|
11-23-2004, 04:57 PM
|
#3
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Original Poster
Rep:
|
Hi.
How do I enable samba as a service?
Once I've done that how do I start samba?
The only folder being shared by samba is a subfolder of my home folder (when not logged in as root) - so nothing of critical importance could be affected I don't think.
Thanks
Ben
|
|
|
11-23-2004, 06:20 PM
|
#4
|
Member
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620
Rep:
|
Did you try '/etc/init.d/smbd start' ?
Did you try 'chkconfig' or 'service' or 'serviceconf'?
|
|
|
11-23-2004, 07:14 PM
|
#5
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Original Poster
Rep:
|
Oh I didn't realise I just had to type all that in.
Just tried it and none of these seem to do anything.
On a command prompt as root typing...
/etc/init.d/smbd start
I get 'no such file or directory' error.
Typing...
chkconfig
I just get the help for that command.
Typing...
service
I get the help again
And typing...
serviceconf
I just get 'command not found'
Is that meant to enable samba as a service?
I would have thought enabling something as a service would be slightly more involved than that.
I have no ideas what the above commands are meant to do. What's their proper usage with regards to getting samba working when I'm not logged in as root?
Basically I want to have samba started when I logon to my user account (not root).
Am I going about this the right way?
Thanks for your help so far.
Ben
|
|
|
11-23-2004, 08:05 PM
|
#6
|
Senior Member
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765
Rep:
|
in RH its
/etc/rc.d/init.d/smb restart
or stop or start depending on what you need/want to do with that service.
check out this HOWTO for samba. it is written for RH in mind. very awsome and easy to follow:
http://home.nyc.rr.com/computertaijutsu/samba.html
enjoy.
|
|
|
11-24-2004, 03:59 PM
|
#7
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Original Poster
Rep:
|
Hi
Just tried typing that. When *not* logged in as root
And I'm getting the same error as before
Code:
Starting SMB services: smbd: Version 2.0.10-ja-1.1 : Must have effective user id of zero to run.
[FAILED]
Starting NMB services: [OK]
What does that mean? Effective user id of zero?
Is there a way to run samba without being root?
I was told it's dangerous to login as root all the time but it seems being root is the only way to actually get anything working.
Thanks
Ben
|
|
|
11-24-2004, 05:06 PM
|
#8
|
Senior Member
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765
Rep:
|
use root to controll services. that is what you are doing. open up a terminal, log in as user, su - to root, then run the above command i gave you. then you can logout/exit out of both root and user and be happy.
what you do not want to do is use the root account as your primary account. use root for what it is there for. configuring and changing things to the system. for normal use of programs and files, stick with user. that is what it is there for.
|
|
|
11-24-2004, 05:16 PM
|
#9
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Original Poster
Rep:
|
Yeah that works fine when I'm logged in as root.
I want to try and get samba to run automatically when I start my system.
Is there any way to do this?
I guess I could add that command to the ~bash profile file in root then login to root.
Then immediately log out once the samba service has started.
I basically want to be able to boot my machine and then use samba.
It would be even better if samba was starting before my machine got to the login prompt.
Is that possible?
Thanks for all your help
Ben
|
|
|
11-24-2004, 06:47 PM
|
#10
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
To get samba to start automatically when the system boots up, type in (as root):
chkconfig smbd on
chkconfig nmbd on
That will start samba up automatically for RH. For other Linux variants, you would need a startup script in /etc/init.d.
-twantrd
|
|
|
11-25-2004, 09:25 AM
|
#11
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Original Poster
Rep:
|
So if I type that as root, that will work even if I login as a normal user?
Thanks
ben
|
|
|
11-25-2004, 04:43 PM
|
#12
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Original Poster
Rep:
|
Hi
Just tried that and I get the message...
Error reading information on service smbd: No such file or directory
I was logged in as root.
Any ideas as to why this is happening?
Thanks
Ben
|
|
|
11-25-2004, 05:13 PM
|
#13
|
Member
Registered: Feb 2002
Posts: 322
Rep:
|
Yeah, on RH and MDK its:
chkconfig smb on
chkconfig nmd on
Then it will run at startup
|
|
|
11-25-2004, 07:41 PM
|
#14
|
Member
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95
Original Poster
Rep:
|
Hi
Tried the smb one and it worked fine!
Well I think it worked fine.
I just got a new line on the command prompt.
But when trying the 'chkconfig nmb on' command I get...
Error reading information on service nmb: No such file or directory
What is NMB?
Does it need to be on in order for me to use samba correctly?
Will this mean samba will start even if I login as a user and not root?
Thanks for all your help.
Ben
|
|
|
11-26-2004, 12:26 AM
|
#15
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
nmbd - NetBIOS name server to provide NetBIOS over IP naming services to clients
My understanding is yes...you need nmbd to run smb correctly.
-twantrd
|
|
|
All times are GMT -5. The time now is 03:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|