Samba setup on Ubuntu and Winxp

Posted on 2006-03-30
Last Modified: 2012-06-21
I created a new folder in my home directory and shared it so that i can access that from my windows machine, but everytime i would try to access the share i.e. //ipaddress/myshare,,, i got a prompt to enter username and password. I would enter the ubuntu username and password, but it kept giving me MYDOMAIN\username on the windows logon popup. So i replaced MYDOMAIN with the hostname of ubuntu machine but it still didn't work

So i uninstalled samba by typing
apt-get remove samba
it stopped the samba daemon and uninstalled successfully

i then tried to install it again by typing
apt-get install samba, it gave me the following error

Selecting previously deselected package samba.
(Reading database ... 60508 files and directories currently installed.)
Unpacking samba (from .../samba_3.0.14a-6ubuntu1_i386.deb) ...
Setting up samba (3.0.14a-6ubuntu1) ...
 * Starting Samba daemons..                                              [fail]
invoke-rc.d: initscript samba, action "start" failed.

Can you tell us what i was doing wrong that i coudn't access the share?
Any help will be appreciated.
Question by:jibranilyas

    Author Comment

    update -- i manually deleted samba file in init.d folder and also the samba folder from /etc

    i removed again and reinstalled.. now the apt-get doesn't give any failure warnings but samba isn't running

    i just checked my /etc/samba - nothing there
    i can't find any samba file in /etc/init.d
    LVL 19

    Expert Comment

    check is the service is running.

    the smbd daemon:
    ps -efa | grep -v grep | grep smbd
    and the nmbd daemon:
    ps -efa | grep -v grep | grep nmbd

    if you get lines of output, then the service is running.

    however, you need to configure samba in order to start it correctly and get benefit from it.
    edit the file /etc/samba/smb.conf using the docs as guide:

    Author Comment

    thanks Redimido,

    I ran those two commands, there was no output

    user@ubuntu2:~# ps -efa | grep -v grep |grep smbd
    user@ubuntu2:~# ps -efa | grep -v grep |grep nmbd

    can i completely remove samba and reinstall it?
    again, i have tried doing 'apt-get remove samba' and 'apt-get install samba' and that didn't make any difference.
    It doesn't give me errors, but then i can't find samba executable and the configuration file in my computer

    LVL 19

    Accepted Solution

    samba is comprised of two daemons:

    smbd and nmbd. There will be only one nmbd in your system and one smbd for each user.

    you should be able to start samba by yourself if you enter

    but there are scripts that take care of that for you.

    so try to start samba from /etc/init.d/samba start

    if samba does not start, then you should be able to see what happened in the log:
    cd /var/log/samba/
    read all logs there.

    maybe you already have some logs. ok, then I would do
    mkdir 0
    mv * 0
    /etc/init.d/samba restart

    and see the new logs as they are filled, and then read them looking for the problem.

    LVL 19

    Assisted Solution

    As far as the authentication goes, you need to add yourself as an smb user, and set your smbpassword, like this:

    sudo smbpasswd -a <username>

    Author Comment

    ^ ya, i guess i missed the smbpasswd step in my initial configuration.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    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…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now