Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba configuration & passwords

Status
Not open for further replies.

ayjaycee

Technical User
Mar 5, 2001
291
GB
I've inherited a Solaris box (2.5.1) running Samba (version 1.9.18p4) which has been running since before my time.

I now need to add a new share with access restricted (i.e. guest ok = no).

I've tried various things, but Windows (98SE) still keeps asking for a password when I try to map to the new share.

The question is, does anyone have any ideas on how I can set the password?

I've gone through the Samba docs & noted the following :-
- There are 'private' shares that people can access, but no-one can remember the passwords that were originally used (and are presumably cached by windows).
- My Windows PC can access public (guest ok = yes) shares OK.
- My PC hasn't got the registry setting that forces plain text passwords.
- The Samba configuration file has NOT got the workgroup, netbios name, encrypt passwords or security parameters, so the defaults apply.
- There's no private/smbpasswd[/b] file

So, although there's a lot in the docs about setting up password encryption etc., that's not what I'm after. The setup is currently working OK & I don't want to break it ;-) - I just want to figure out where the passwords are being kept & how to set up a new (password protected) share!
TandA

One by one, the penguins steal my sanity.
 
i'm pretty new to samba myself but i have it running on a freeBSD box.

to create new shares, all that i have to do is add that user account to both unix and windows boxes and use the same password for both accounts.

then, when i login to windows with that account and go to network neighborhood, that same account on the unix box shows up. to get a public share, i do this:

# This one is useful for people to share files
[fileshare]
comment = Temporary file space
path = /home/fileshare
read only = no
public = yes
create mask = 0775
directory mask = 0775

and for the normal private shares where each user has his own share i do this:


[homes]
comment = Home Directories
browseable = no
writeable = yes


hope that helps.

eric

 
OK, here's our (cut down) smb.conf file (below).

NB: the [bb] share is the new one I'm trying to get to work.
the [public] share works OK (the log files show that the connection is made as the guest ID "pcnfsptr").
the [z1800] share works OK for our users, but not for me :-(

The users cwmshop & z1800 are defined on the unix box. In the Samba log files, there are entries such as :-
teradyne 1 (IP addr) connect to service z1800 as user z1800 (uid=1299,gid=10)
teradyne 1 (IP addr) connect to service z1800 as user cwmshop (uid=12494,gid=10)

& the users log on to the windows PC (teradyne 1) as cwmshop or z1800.

So, I created a unix ID of andrewc (to match my Windows network ID) and tried to access the z1800 share. When asked for a password, I put in my unix one - no joy :-(

I've also found out what password the users use to access the z1800 share & I tried that - no good.

============================================================
# cat smb.conf
[global]
printing = sysv
printcap name = /etc/printcap
load printers = yes
print command = lp -d%p %s
path = /usr/spool/samba
guest account = pcnfsptr
log file = /usr/local/samba/logs/log.%m
preserve case = yes
short preserve case = yes
case sensitive = no
deadtime = 10
#
############################################################
# Special shares ...
============================================================
[homes]
comment = Home Directories
browseable = no
read only = no
create mode = 0750

[printers]
comment = All Printers
browseable = no
printable = yes
public = no
writable = no
create mode = 0700

############################################################
# Directory shares ...
============================================================
[bb]
path = /home/bb/bb
comment = Big Brother
guest ok = no
writeable = yes
valid users = ajc andrewc

[public]
path = /arch1/AppleShare/public
guest ok = yes
writeable = yes

[z1800]
path = /proj1/ams980/z1800
guest ok = no
writeable = yes
valid users = z1800 mxr ajc andrewc pjb swhitcom jbmore cwmshop cwcroot
#
############################################################ TandA

One by one, the penguins steal my sanity.
 
Hi
this is just wild guess.
Try running smbpasswd as root.
Try moving valid user line just after path

Patel
 
Hi Don't forget to restart smbd everytime you make change in .conf file.

Patel
 
Patel,

smbpasswd complains about there being no private/smbpasswd file - the private directory doesn't actually exist, so I'm reluctant to go creating it as the Samba setup is obviously working (for our existing users) without it.

I don't usually restart smbd as it re-reads the .conf file automatically, but I'll certainly give it a try ... nope, no difference (apart from anoying all the users that were connected!) TandA

One by one, the penguins steal my sanity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top