Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want a /shared directory, viewable and writeable to anyone/guests. (Or that was my original goal, maybe I can set it up with a user and allow windowsXP to remember the password)
Then I also want to use the "homes" section, so all valid users on the box can use samba to edit their home directories.
I had a single directory shared as guest, and it worked. Now that I'm trying to add the homes section I'm having problems. I was editing smb.conf manually with documentation, now I'm trying out swat.
1) What do I need to change so I can login to "\\debian\user" and view that users directory?
In winXP, I try connecting to \\debian, \\debian\jake, and neither work. "jake" is a valid user. WindowsXP gives me a user/password dialog, and I enter and hit ok. Then it still shows the dialog but it says "COMPUTER\user", and password. (Where computer is your computer name) And it lets me hit "ok" forever, and doesn't work.
2) How should I make the 'guest' share? I had it shared with no password, but maybe I should create a 'samba-guest' something user to use to login to that directory? What's the best way?
I tried testing setting /shared to not use guests, and valid user=jake. but I can't login, the dialog keeps hitting okay and doing nothing.
Code:
#Attempting to password /share, with USER security
[global]
workgroup = HOME
server string = Debian samba
security = USER
[shared]
comment = Shared Data
path = /shared
valid users = jake
read only = No
[homes]
comment = Home Directories
valid users = %S
read only = No
Code:
# Here's my current smb.conf
# Global parameters
[global]
workgroup = HOME
server string = Debian samba
security = USER
[shared]
comment = Shared Data
path = /shared
read only = No
guest ok = Yes
[homes]
comment = Home Directories
valid users = %S
read only = No
there is some command like
smbadduser [or] smbuseradd that will create a smb.passwd file with users you want to share /home dir for .
I found that file, it's a shell script in the documentation directory. It looks like its a wrapper for smbpasswd, and edits users.map. (Which it doesn't sound like I want a usersmap from man 5 smb.conf)
From the examples I was following, it looked like I didn't have to mess with smb.passwd since I was declaring a [homes] section, so it shares /home/%username based on if they match the linux username and password file.
Even so, I did add user 'jake' using smbpasswd, and setting valid users on /shared to jake.
Code:
smbpasswd -a jake
<enter password>
It still didn't work.
Quote:
And the best way to have a User's /home/user directory work in windows is to create a user with same Username in windows and login.
Now you will be able to access the Users home directory.
I don't understand this. In windows it's a single user OS. winXP is a little different, but from what I know, it's still basically single user. Logging in with the username of the windows account logged in did work when I allowed guests, but another computer didn't even ask for the user. (Ie: as long as i'm using a valid username/password on the linux computer at the windowsXP user/pass prompt, I don't see what the xp username has to do with it. Regardless, it is set to 'jake' on winXP)
Just to clarify, I'm trying to share two sections, a directory, and a home directory based on user name:
/shared : share as either guest, or maybe I need to create a 'guest-user' so that it works in security=USER?
/home/%user : adding the [homes] section should share /home/%user if user is a user on the linux computer, and password is valid.
Thanks for the help. I'm still unable to get anything besides security = share to work.
1) What else can I check? I'm reading all the links at samba's website(docs, manuals, howtos) and I can't figure out what to do. Part of it is past me since I don't know what all these MS-terms are, like: ADS, SSO, etc. It says the acronym's meaning, but I don't know if they are what I need.
2) I tried to test sharing just /home/jake instead of using the special [homes] section and it still failed. Used
3) Should I be doing something with server = domain, or SSO, or PTD?
4) Or should I be using the "net" command for something? (from: http://us3.samba.org/samba/docs/man/...html#id2526957 ) I didn't know exactly what this would do, or how to cancel / reverse it, so I haven't done it yet, but it may be related to my problem?
Code:
root# net rpc join -U Administrator%password
Quote:
Security settings in samba change a bit for different windows version.
Check the manual and see if you configured windows network properly.
I didn't see any links that said much about windowsXP, except that NT and newer does not use clear text passwords by default. Unless this has to do with setting up a domain or ADS or whatever server, I think it's cofigured right. Unless I need to change something with smbpasswd? (Haven't touched it since the command I posted before)
Quote:
Also a name value pair
encrypt passwords = yes
used to be specified in smb.conf file.Enable this option and give a try.
I enabled that, but it didn't help. I just checked the man page and it is on by default, so I guess that has been enabled.
Quote:
See what error is being given by windows in the log file.
Check the log file to see for any possible error.
Logs on windows, or samba(linux)? There are several logs at /var/log/samba, but I only noticed one that has any entries dated for today, but then noticed it was just SWAT's config.
Code:
/var/log/samba/swat.log
[2006/05/02 13:35:05, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:35:05, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:35:05, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 13:38:45, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:38:45, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:38:45, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 13:40:00, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:40:00, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:40:00, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 13:40:47, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:40:47, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:40:47, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 14:11:43, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 14:11:43, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 14:11:43, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 14:11:58, 0] param/loadparm.c:service_ok(2649)
No path in service jake - using /tmp
[2006/05/02 14:12:16, 0] param/loadparm.c:service_ok(2649)
No path in service jake - using /tmp
To double-check I tried to grep all logs in the directory, I did: (There's probably a better way, but I just made this up)
Code:
# cd /var/log/samba
# ls > ~/logs.in
# cat < ~/logs.in (didn't work, thought it would use file as STDIN, so then tried)
# cat `cat ~/logs.in` > ~/logs.txt
# grep -A4 -B2 2006/05 ~/logs.txt | less
Here's the output of "# grep -A4 -B2 2006/05 ~/logs.txt | less"
Code:
[2006/04/18 01:30:02, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2006/05/02 13:29:43, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 13:29:46, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 13:30:20, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
*****
Samba name server DEBIAN is now a local master browser for workgroup HOME on subnet 192.168.1.107
*****
[2006/05/02 13:35:08, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 13:35:11, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 13:38:48, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 13:38:51, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 13:40:03, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 13:40:06, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 13:41:43, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 13:41:46, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 13:47:33, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
*****
Samba name server DEBIAN is now a local master browser for workgroup HOME on subnet 192.168.1.107
*****
[2006/05/02 14:07:43, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 14:07:46, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 14:10:13, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 14:10:16, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 14:12:24, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 14:12:27, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 14:17:31, 0] nmbd/nmbd.c:terminate(56)
Got SIGTERM: going down...
[2006/05/02 14:17:34, 0] nmbd/nmbd.c:main(668)
Netbios nameserver version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1994-2004
[2006/05/02 14:23:19, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
*****
Samba name server DEBIAN is now a local master browser for workgroup HOME on subnet 192.168.1.107
--
[2006/04/30 21:48:59, 1] smbd/service.c:close_cnum(830)
peggy (192.168.1.101) closed connection to service shared
[2006/05/01 02:27:47, 0] lib/util_sock.c:get_peer_addr(1150)
getpeername failed. Error was Transport endpoint is not connected
[2006/05/01 02:27:47, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2006/05/01 02:27:47, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 5: ERRNO = Connection reset by peer
[2006/05/01 02:27:47, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2006/05/01 10:49:20, 1] smbd/service.c:make_connection_snum(642)
peggy (192.168.1.101) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 11527)
[2006/05/01 10:52:08, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2006/05/01 10:52:08, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 24: ERRNO = Connection reset by peer
[2006/05/01 10:52:08, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2006/05/01 14:56:39, 1] smbd/service.c:close_cnum(830)
192.168.1.122 (192.168.1.122) closed connection to service shared
[2006/05/01 15:06:44, 0] lib/util_sock.c:get_peer_addr(1150)
getpeername failed. Error was Transport endpoint is not connected
[2006/05/01 15:06:44, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2006/05/01 15:06:44, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 5: ERRNO = Connection reset by peer
[2006/05/01 15:06:44, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2006/05/01 15:06:44, 1] smbd/service.c:make_connection_snum(642)
192.168.1.108 (192.168.1.108) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 11622)
[2006/05/01 16:01:01, 1] smbd/service.c:close_cnum(830)
192.168.1.108 (192.168.1.108) closed connection to service shared
[2006/05/01 16:18:40, 1] smbd/service.c:make_connection_snum(642)
donkey (192.168.1.108) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 11653)
[2006/05/01 17:12:34, 0] lib/util_sock.c:read_socket_data(384)
read_socket_data: recv failure for 4. Error = No route to host
[2006/05/01 17:12:34, 1] smbd/service.c:close_cnum(830)
donkey (192.168.1.108) closed connection to service shared
[2006/05/01 22:27:35, 0] lib/util_sock.c:read_socket_data(384)
read_socket_data: recv failure for 4. Error = No route to host
[2006/05/01 22:27:35, 1] smbd/service.c:close_cnum(830)
peggy (192.168.1.101) closed connection to service shared
[2006/05/01 23:29:01, 0] lib/util_sock.c:get_peer_addr(1150)
getpeername failed. Error was Transport endpoint is not connected
[2006/05/01 23:29:01, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2006/05/01 23:29:01, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 24: ERRNO = Connection reset by peer
[2006/05/01 23:29:01, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2006/05/02 01:01:38, 1] smbd/service.c:make_connection_snum(642)
donkey (192.168.1.108) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 11837)
[2006/05/02 02:48:48, 0] lib/util_sock.c:read_socket_data(384)
read_socket_data: recv failure for 4. Error = No route to host
[2006/05/02 02:48:48, 1] smbd/service.c:close_cnum(830)
donkey (192.168.1.108) closed connection to service shared
[2006/05/02 03:27:02, 1] smbd/service.c:make_connection_snum(642)
donkey (192.168.1.108) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 11890)
[2006/05/02 06:26:10, 1] smbd/service.c:make_connection_snum(642)
192.168.1.122 (192.168.1.122) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 12057)
[2006/05/02 08:32:49, 0] lib/util_sock.c:read_socket_data(384)
read_socket_data: recv failure for 4. Error = No route to host
[2006/05/02 08:32:49, 1] smbd/service.c:close_cnum(830)
donkey (192.168.1.108) closed connection to service shared
[2006/05/02 13:29:44, 1] smbd/service.c:close_cnum(830)
192.168.1.122 (192.168.1.122) closed connection to service shared
[2006/05/02 13:29:46, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 13:35:11, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 13:38:51, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 13:40:06, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 13:41:46, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 14:07:46, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 14:10:16, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 14:12:27, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 14:17:34, 0] smbd/server.c:main(798)
smbd version 3.0.14a-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2006/05/02 14:17:37, 0] smbd/service.c:make_connection(794)
monkey (192.168.1.122) couldn't find service jake
[2006/05/02 14:17:37, 0] smbd/service.c:make_connection(794)
monkey (192.168.1.122) couldn't find service jake
[2006/05/02 14:17:47, 1] smbd/service.c:make_connection_snum(642)
monkey (192.168.1.122) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 12597)
[2006/05/02 14:18:27, 1] smbd/service.c:make_connection_snum(642)
peggy (192.168.1.101) connect to service shared initially as user nobody (uid=65534, gid=65534) (pid 12598)
[2006/05/02 13:35:05, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:35:05, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:35:05, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 13:38:45, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:38:45, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:38:45, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 13:40:00, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:40:00, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:40:00, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 13:40:47, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 13:40:47, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 13:40:47, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 14:11:43, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "only user" option is deprecated
[2006/05/02 14:11:43, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "write cache size" option is deprecated
[2006/05/02 14:11:43, 1] param/loadparm.c:lp_do_parameter(3158)
WARNING: The "mangled map" option is deprecated
[2006/05/02 14:11:58, 0] param/loadparm.c:service_ok(2649)
No path in service jake - using /tmp
[2006/05/02 14:12:16, 0] param/loadparm.c:service_ok(2649)
No path in service jake - using /tmp
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.