Installing Samba
I'm trying to get filesharing working between Windows 2000 and XP and Gentoo but I dont understand how to configure it. I've emerged samba with ldap, kerberos, and winbind like this HOWTO told me but I dont have a domain like that HOWTO and a few others I've found on gentoo-wiki seem to assume. All three computers are in the WORKGROUP workgroup.
As it is right now, my Windows machines can see the shares on the Linux machine but if I click on the folder in Explorer "\\Cocoa\public is not accessible". Similarly on the Linux machine, if I use
smbclient -L capncrunch
I'm asked for a password. If I enter in anything I get NT_STATUS_LOGON_FAILURE. If I leave the password blank I get a list of the servers, workgroups, and which machine is the master and a message that anonymous logon was successful but I get an error returning the browse list: NT_STATUS_ACCESS_DENIED
I'm pretty sure I've done something wrong... but I'm not sure what [smile]
Look at the Samba.org website, they have some HOWTO's and example configurations.
ldap & kerberos stuff is for domain logins and more advanced back-ends. For just a couple of users, you can use smbpasswd, it's simpler and doesn't matter until you have many, many users.
First step is delete /etc/samba/smb.conf
Then type in a new one yourself. Reference the smb.conf.example that Gentoo provides and the HOWTO's & examples on the web.
# Since you don't have/want a domain
security = server
# You need encrypted passwords for W2k & XP
encrypt passwords = yes
# Turn on the WINS server since this will be the master browser
wins support = yes
# Homes is a special share for user home directories
[homes]
valid users = %S
browseable = yes
# General share for people to, well, share
[data]
path = /data
browseable = yes
writable = yes
create mask = 0770
Save smb.conf
Then we need to setup some stuff in linux
Add a linux user if you haven't yet (i.e. adduser)
Then you have to add them to the smb database with smbpasswd
e.g. smbpasswd -a invaderx
Run testparam and check there's no errors
/etc/init.d/samba restart
If you set the same username and password with adduser/smbpasswd as your Windows username & password, it'll just connect to the server when you click on it.
ldap & kerberos stuff is for domain logins and more advanced back-ends. For just a couple of users, you can use smbpasswd, it's simpler and doesn't matter until you have many, many users.
First step is delete /etc/samba/smb.conf
Then type in a new one yourself. Reference the smb.conf.example that Gentoo provides and the HOWTO's & examples on the web.
# Since you don't have/want a domain
security = server
# You need encrypted passwords for W2k & XP
encrypt passwords = yes
# Turn on the WINS server since this will be the master browser
wins support = yes
# Homes is a special share for user home directories
[homes]
valid users = %S
browseable = yes
# General share for people to, well, share
[data]
path = /data
browseable = yes
writable = yes
create mask = 0770
Save smb.conf
Then we need to setup some stuff in linux
Add a linux user if you haven't yet (i.e. adduser)
Then you have to add them to the smb database with smbpasswd
e.g. smbpasswd -a invaderx
Run testparam and check there's no errors
/etc/init.d/samba restart
If you set the same username and password with adduser/smbpasswd as your Windows username & password, it'll just connect to the server when you click on it.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
If you just want your shares accessible by nearly anyone (useful if you are on a LAN and want to share stuff read-only), replace security=server with security=share and add public=yes to the share definition.
Make sure you have proper security (firewall, smb listening on only the backend NIC etc) though or people will be able to leech stuff over the Internet.
Make sure you have proper security (firewall, smb listening on only the backend NIC etc) though or people will be able to leech stuff over the Internet.
Thanks, so far this is my current smb.conf
testparm doesnt report anything wrong with it. I also added two users with smbpasswd, colin and root. I have also restarted samba
Now, whenever I attempt to connect to the Linux from Windows I get a dialog asking me who I want to connect as an a password. No matter what I type in there it comes back telling me that either my username or password is incorrect. I also still have the same problem trying to connect from Linux to Windows - I get NT_STATUS_LOGON_FAILURE no matter what. I also tried to have the Linux machine to itself but I still get NT_STATUS_LOGON_FAILURE
[global]workgroup = WORKGROUPnetbois name = cocoaserver string = Linux boxsecurity = serverwins support = yesencrypt passwords = yes[homes]valid users = %Sbrowseable = yes[public]path = /smb_publicbrowseable = yeswritable = yescreate mask = 0770
testparm doesnt report anything wrong with it. I also added two users with smbpasswd, colin and root. I have also restarted samba
Now, whenever I attempt to connect to the Linux from Windows I get a dialog asking me who I want to connect as an a password. No matter what I type in there it comes back telling me that either my username or password is incorrect. I also still have the same problem trying to connect from Linux to Windows - I get NT_STATUS_LOGON_FAILURE no matter what. I also tried to have the Linux machine to itself but I still get NT_STATUS_LOGON_FAILURE
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement