LinuxQuestions.org
Help answer threads with 0 replies.
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 11-09-2006, 02:51 AM   #1
Kanly6486
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Rep: Reputation: 0
problems with my samba server


ok well i had the server up and runing but now i want to have it password protected, i would like either custom user names or the same ones i use to log on to ubuntu here is what i have in my smb.conf now

[global]

netbios name = samba
workgroup = MSHOME
security = share
log file = /var/log/samba.log
log level = 1
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=16384 SO_SNDBUF=16384
wins support = yes
domain logons = no
logon drive = f:
logon home = \\stefan\%U
os level = 99
preferred master = yes
local master = yes
hosts allow = 192.168.1.100 192.168.1.101 192.168.1.102 192.168.1.102 192.168.1.103 192.168.1.104
encrypt passwords = yes
browseable = yes
lanman auth = yes
lm announce = yes

[shared]
path = /mnt
guest ok = yes
writeable = yes
create mode = 0666
directory mode = 0777
browseable = yes
public = yes


i yanked it from another website and modified it for my own needs but once i insert the map user and such it either wont let me even touch the samba from my windows computer, or it will ask me for a user name and password and i cant use any of the things i put in there.
 
Old 11-09-2006, 04:39 AM   #2
bob_man_uk
Member
 
Registered: Jul 2003
Location: Malta
Distribution: Ubuntu/Windows/Mac
Posts: 83

Rep: Reputation: 16
ok i have had this problem before,

IIRC the answer lies with smbpasswd.

the user trying to access the samba server needs to have a account exactly the same on the server

EG

windows user = aperson
*nix server user = aperson

do
smbpasswd aperson

and it should ask you to enter your password twice... just like passwd would.

try connecting now and see what happens.

hope it helps

Matty G
 
Old 11-09-2006, 09:54 AM   #3
Kanly6486
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bob_man_uk
windows user = aperson
*nix server user = aperson
are you saying that the windows login i use needs to be the same as the linux one? Also is there anything i need to put into my smb.conf file to get this to happen?
 
Old 11-09-2006, 10:12 AM   #4
bob_man_uk
Member
 
Registered: Jul 2003
Location: Malta
Distribution: Ubuntu/Windows/Mac
Posts: 83

Rep: Reputation: 16
im not saying you have to or thats how its supposed to work, im jst saying thats what i did to get it to work.

im smb.conf i have valid users set to me and my boss bwallace, anyone else tries to access and they get told to bugger off, if my password doesnt match the unix one then it will prompt me for my uname and password.



Code:
[www]
path = /htdocs
valid users = mgilbert bwallace
public = yes
writable = yes
printable = no
create mask = 0644
 
Old 11-09-2006, 10:29 AM   #5
my.dying.bride
LQ Newbie
 
Registered: Nov 2006
Distribution: Vector Soho Edition 5.1(Best yet)
Posts: 25

Rep: Reputation: 15
Quote:
Originally Posted by Kanly6486
are you saying that the windows login i use needs to be the same as the linux one? Also is there anything i need to put into my smb.conf file to get this to happen?
No it doesn't. It's easier if it is though. But you can map a username from a windows machine, say "Super", to an account you already have on your linux ,say "Man". So when the windows user "Super" connects to your samba server, he connects as "Super" and this name is first checked against your linux userdatabase. If there are no matches, Samba will see if you have setup a mapping file it can use. If it finds that file , it may read "Man"="Super" or vice vers, it uses the account on your machine "Man" with its belonging user rights. It has been long long time since i did this, I can see if i find an old smb.conf , but I guess other people in here will be able to help you faster with this. You must enable the mapping in your smb.conf (forgotten Must google it..lazy me..), create the mapping file. BTW, lanmanager password is really weak and cracked easily. You only need it if you have <win98 machines in your lan that will connect to you. Otherwise set NT as min protocol.
 
Old 11-09-2006, 11:37 AM   #6
Kanly6486
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Original Poster
Rep: Reputation: 0
ok so just take out the lanman stuff? and i should put in
security = users
username map = /etc/samba/sambausers

and inside of the sambausers i should have my_linux_name = my_login_name

would that be correct?

Last edited by Kanly6486; 11-09-2006 at 11:38 AM.
 
Old 11-10-2006, 01:00 PM   #7
my.dying.bride
LQ Newbie
 
Registered: Nov 2006
Distribution: Vector Soho Edition 5.1(Best yet)
Posts: 25

Rep: Reputation: 15
Quote:
Originally Posted by Kanly6486
ok so just take out the lanman stuff? and i should put in
security = users
username map = /etc/samba/sambausers

and inside of the sambausers i should have my_linux_name = my_login_name

would that be correct?
It looks perfect at first sight. Your_login_name is the name used from your windows machine. A little but.. I used to study the logs from this process setting it up on my own, but like i said a lot is forgotten and the config files have been deleted with a harddisk crash (windows..). I think that after your username has now been mapped to my_linux_name, you may run into password problem if password my_linux_name<>my_login_name. If you increase the loglevel in your smb.conf (1 is default), up to 2 or 3 or 4 or sth.. you can study the logon ,handshaking, in detail to see where you are rejected. If it is bad username or bad password.

Sorry for not remembering all, but you are def. on the right track and train

There is also a goround.. Windows automatically tries to log on as current user, then as anonymous. And if you have allowed anonymous access, but want to log on as root, you should disconnect the mapped drive on your wndows desktop belonging to the linux server , but that windows automatically mapped read only as "anonymous=nobody" if guest login was allowed. Then you can remap it by using normal Windows "map network drive" wich allowes you to enter different username and password from the your "CurrentUser" credentials

Laughs... Sry my english. not a native )

Last edited by my.dying.bride; 11-10-2006 at 01:08 PM.
 
Old 11-10-2006, 08:18 PM   #8
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Also, please remember that a samba account is NOT a linux account. What that means is if you and your boss have actual accounts on the linux machine, and try accessing them through samba, it will fail if you use the regular password. That is because samba can't read the file where the login passwords are stored. You really do need to run the smbpasswd command for each user who will log in through samba. You can make the samba password the same as the login password, although that would not be secure at all. Create the samba pass, and then all should go smoothly.

Peace,
JimBass
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Samba Server Problems ( newbie ) WhiskeyTangoFoxtrot Linux - Networking 3 02-26-2006 12:00 AM
Samba WINS Server Problems (I think) skaarak Linux - Networking 2 04-28-2005 07:44 PM
Samba server and XP connectivity problems maybbach Linux - Networking 6 05-21-2004 10:25 PM
Problems setting up a samba server colpaarm Linux - Software 3 07-25-2003 07:35 AM
Samba problems... multiple connections to a server .... ccool Linux - Networking 0 06-03-2003 03:47 PM


All times are GMT -5. The time now is 06:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration