Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed samba-server, libpam-smbpass and smbclient on my ubuntu 10.04. And I have uncommented the following in my smb.conf file:

security = user
[homes]
   comment = Home Directories
   browseable = no
   read only = no

ANd I created a unix user account and logged in via shell to get the account activated. And I tried \\sambaserver\username, but I cannot login.

And I tried this in the shell: smbclient -L localhost -U username. And it shows this:

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.4.7]

    Sharename       Type      Comment
    ---------       ----      -------
    print$          Disk      Printer Drivers
    IPC$            IPC       IPC Service (sambaserver server (Samba, Ubuntu))
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.4.7]

    Server               Comment
    ---------            -------
    SAMBASERVER          sambaserver server (Samba, Ubuntu)
    UNKNOWN              tomato

    Workgroup            Master
    ---------            -------
    WORKGROUP            UNKNOWN

The above doen'tt show the shared home directory.

EDIT: 1

I want samba accounts to be created automatically when I add unix accounts. For that I use libpam-smbpass package. I used to add hundreds of unix accounts in batch mode, and the above mentioned package also created samba accounts automatically on my old server. Now, on my new server, it isn't happening. The account I created soon after installing libpam-smbpass is working fine. But the accounts created after a reboot aren't. The command pdbedit -w -L doesn't list the recently added accounts. For testing, I installed libpam-smbpass on my desktop and created two dummy unix accounts, and pdbedit -w -L command showed that it also created samba accounts. But it doesn't work on my ubuntu 10.04 based new server.

share|improve this question
    
You did restart samba, right? sudo service smbd restart –  charlesbridge Apr 5 '11 at 12:51
    
It's running, restarted it many times. And the accounts I created a wile ago are working fine. Only have the issue with the recently created accounts. –  nixnotwin Apr 5 '11 at 13:21

1 Answer 1

up vote 1 down vote accepted

Have you added the user to whatever SAM database that is configured in smb.conf?

smbpasswd -a username

You say accounts you created a while ago are working, does that mean account on this same computer that were created before samba was installed are working or that you've created a similar setup before and that installation worked?

share|improve this answer
    
see my edit above. –  nixnotwin Apr 5 '11 at 14:56
    
@nixnotwin, have you checked your PAM rules (usually in /etc/pam.d, not sure about Ubuntu) to see if libpam-smbpass is properly configured for the authentication service that you're using to perform the first "shell" login? For example, if you're doing the first login via SSH, make sure that libpam-smbpass is in /etc/pam.d/sshd (or via an "include" of another PAM configuration file where it is listed). Not sure what else it could be. –  rthomson Apr 5 '11 at 15:53
    
I'm not using openssh-server(sshd), instead I use dropbear. Would that be the reason for the issue? –  nixnotwin Apr 5 '11 at 17:32
    
Yes it is the issue with dropbear. It doesn't create a sshd file in pam.d directory. –  nixnotwin Apr 6 '11 at 5:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.