[Samba] Rename a user...

2013-01-06 Thread Modulok
List,

I had to rename a system user account. I deleted the corresponding samba user
via `pdbedit` and re-added the user under the new spelling. E.g: `fo` became
`foo`. I also edited the system group and passwd files using appropriate
commands. (On FreeBSD.) No problems. The output of `pdbedit --list` is shows
the new, correct spelling. The user's home directory was also renamed on the
server to the new spelling.

The problem, is `smbtree` still lists the old spelling and the share is now
inaccessible from windows clients under the new spelling.

Some command line rummaging::

pdbedit --list --user foo
foo:1005:User 

That's correct. How about the system user::

grep foo /etc/passwd
foo:*:1005:1005:User :/home/foo:/bin/tcsh

Correct. How about the group file::

grep foo /etc/group
foo:*:1005:

Good. And the home directory::

ls -d /home/foo
/home/foo

All good... but then evil strikes::

smbtree --no-pass
...
\\fido\fo #-- The old spelling! Where does this come from?!
...

I restarted the samba server process but it didn't help. The server `fido` is
the local browse master and a wins server. Are the names listed by smbtree
cached somewhere else? If so how do I mark them as dirty?

Thanks!
-Modulok-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Client access multiple shares with different usernames...

2013-01-04 Thread Modulok
 This is a limitation in Windows clients and not really a Samba issue.
 (People accessing shares on Windows servers face the same problem.)
 Basically the client can only handle one user name per server name.
 AFAIK there is no elegant workaround for this.

 One solution is to access one share via the NetBIOS name and the other
 via a DNS name (e.g. using \\bsd.some.domain\bar) or even the IP
 address.

 Another solution would be adding NetBIOS aliases to the server and
 accessing different shares with different authentication via
 different aliases.

 Kind regards
 Wolfgang Ratzka



That's what I was afraid of. I guess its time I look into aliases.

Cheers!
-Modulok-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Client access multiple shares with different usernames...

2013-01-03 Thread Modulok
List,

I have a FreeBSD box with samba and two shares '\\bsd\foo' and '\\bsd\bar'.
Each require a different password. (Different system user accounts and
different corresponding samba account.) They both work. The problem is that
from Windows 7 and windowsXP clients I can connect to '\\bsd\foo', but then I
can never connect to '\\bsd\bar' until I restart. Thereafter I can never
connect to '\\bsd\foo' until I restart... and so on.

Is there a way I can connect to multiple shares from the same client, using
different authentication for each share? For example, if I could put a username
in a UNC path that would solve everything:

\\foo@hostname\some\resource

Any suggestions or links to examples would be great.

Thanks!
-Modulok-


Below is my test smb.conf file::

# Begin smb.conf
[global]
smb ports = 139
workgroup = MShome
os level = 255
domain master = yes
local master = yes
preferred master = yes
wins support = yes
name resolve order = wins bcast lmhosts
server string = bsd
netbios name = bsd
hosts allow = 192.168.1.
printcap name = /etc/printcap
log file = /var/log/samba.log
max log size = 1000
socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=17520
SO_SNDBUF=17520 IPTOS_LOWDELAY
interfaces = 192.168.1.3/24
guest account = public
security = user
map to guest = Bad User
encrypt passwords = yes
invalid users = root toor
browseable = yes

max disk size = 10
# Makes samba lie to stupid programs like photoshop, reporting
# this (in megabytes) as the maximum volume size. This does
# not limit the actual size of the volume, only the reported
# size.

create mask =  0644
directory mask = 0755
client NTLMv2 auth = yes

null passwords = no
# Allow or disallow client access to accounts that have
# null passwords.

unix extensions = no
# Keep this off if you enable wide links. This is only used by
# unix clients and is of no use to windows clients.

wide links = yes
follow symlinks = yes


[foo]
path  = /home/%S
writable = yes
guest ok = no
hide dot files = yes


[bar]
path  = /home/%S
writable = yes
guest ok = no
hide dot files = yes

# End smb.conf
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba