ba72 Samba: Users can log in remotely, but not from inside the network - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Web & Network Services

Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old August 26th, 2011, 20:05
mallen324 mallen324 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 51
Thanks: 20
Thanked 0 Times in 0 Posts
Default Samba: Users can log in remotely, but not from inside the network

I have a user (plynn) that can log into the samba server either from outside the network, or from inside the network - only if she is connecting via WinSCP or filezilla. The username and pass don't work if accessing it from the LAN like normal on a windows or linux (ubuntu) box. I have had the problem before with my own username (newer to the company), but completely forgot how to fix it.

I do remember getting my username on the 'pdbedit -L' list got it to work, but I am unable to add the username to the list with 'sudo pdbedit -a -u plynn' or 'sudo pdbedit -a plynn'. It returns with:
Code:
$ sudo pdbedit -a -u plynn
Password:
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=****))]
smbldap_open_connection: connection opened
ldap_connect_system: successful connection to the LDAP server
new password:
retype new password:
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=SPRINGFIELD))]
ldapsam_add_sam_account: Adding new user
init_ldap_from_sam: Setting entry for user: plynn
ldapsam_add_sam_account: failed to modify/add user with uid = plynn (dn = uid=plynn,ou=people,"dc=****,dc=com")
Failed to add entry for user plynn.
(I starred out potentially identifiable information)

Any ideas?


Samba 3.4
FreeBSD 8.1

Last edited by mallen324; August 26th, 2011 at 20:51.
Reply With Quote
  #2  
Old August 26th, 2011, 20:38
mallen324 mallen324 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 51
Thanks: 20
Thanked 0 Times in 0 Posts
Default

Ok so I was just trying things out and I can add them to the list of pdbedit -L after I delete their account off local machine using 'sudo rmuser plynn'.

But once I do that, they cannot log in remotely! I think it is because then they don't have an account in /etc/passwd. I tried doing what I just said, but when I run 'sudo adduser' (to try and get the username added to /etc/passwd), when I supply the username plynn it yells at me that it already exists.

EDIT:
I have another username that is listed with 'pdbedit -L', and not in the /etc/passwd file, that is able to log in whichever way. So I am now even more dumbfounded.

Last edited by mallen324; August 26th, 2011 at 21:05.
Reply With Quote
  #3  
Old August 26th, 2011, 22:12
Sylhouette Sylhouette is offline
Member
 
Join Date: Nov 2008
Posts: 174
Thanks: 5
Thanked 25 Times in 16 Posts
Default

You must make sure you are checking against the right user password database.

Samba users as i can tell from your story are stored in the LDAP database.

If they use winscp, they do a ssh to the machine, only ssh will check the local /etc/passwd database.

i think you can solve this with the /etc/pam.d/sshd

http://www.freebsd.org/doc/en/articl...uth/index.html

BE VERY CAREFULL , you can lock yourself out.

So never log out as root before you know you can still login.

I never have done this, but this is your problem.

regards,
Johan
Reply With Quote
The Following User Says Thank You to Sylhouette For This Useful Post:
mallen324 (September 9th, 2011)
  #4  
Old August 30th, 2011, 19:04
mallen324 mallen324 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 51
Thanks: 20
Thanked 0 Times in 0 Posts
Default

Ok, for some reason I entered 'sudo pdbedit -a -u plynn' and it successfully added! I have no idea why it worked this time. Is it possible for a server to only accept new usernames during certain times or something? Oh well, I added her, but when I went to add another user, it seemed to have added him, but it is not working. Here's my 'pdbedit -L' (edited to show only the username-changed- I am now trying to get to work.)"

Code:
init_sam_from_ldap: Entry found for user: username01
ERROR: Got 0 entries for gid 2645, expected one
ERROR: Got 0 entries for gid 2645, expected one
ERROR: Got 0 entries for gid 2645, expected one
username01:2645:Full Name
This is a weird username to tell you the truth. I have no idea where it came from. It didn't have a local account, and it wasn't even mentioned in the pdbedit -L until I tried adding it. I think I am going to ask the user if he's even aware of the login. If he isn't I'll try and delete the username completely and make a local account and try the 'pdbedit -a -u username01' throughout the day til it adds.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] Samba Users - A Slew of Problems mallen324 Web & Network Services 6 August 26th, 2011 18:48
[Solved] cannot remotely log in after pulling FreeBSD source to /usr/src via sysinstall shva General 5 October 3rd, 2010 11:56
[Solved] internet gateway inside the private network lezde716 Networking 5 September 15th, 2010 03:01
[Solved] Unable to authenticate users with Samba marco_r Web & Network Services 2 September 9th, 2010 08:48
mpd5 problem when users are connected to other public network through PPTP or PPPOE devil_devil Networking 18 March 4th, 2010 16:11


All times are GMT +1. The time now is 18:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0