Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Problem with SAMBA Authentication

Posted on 2003-02-28
6
Medium Priority
?
390 Views
Last Modified: 2012-06-27
I have a Linux 8.0 box running Samba that I am trying to access from a Windows 2000 Pro workstation.  If I set Samba security to Share, I am able to access the share without a problem.  If I set Samba security to User, I am prompted for a username and password.  I attempt to access the share using the root username and password but I am denied.  I've also tried using two other user accounts on the Linux box but I am also denied. All accounts that I have tried have read/write access to the shares.  Only the root account is listed in the smbuser file.  Do I need to add another account to the smbuser file and, if so, how is this done. Any help is greatly appreciated.

0
Comment
Question by:jl4k3
6 Comments
 
LVL 9

Accepted Solution

by:
majorwoo earned 80 total points
ID: 8047670
did you add a samba account for the root user using? (And yes you should add another user, never use root unless you have to (to join a domain or something) )

smbpasswd -a username
0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 8048280
I believe you can also switch which password file samba uses for authentication to the system password file.  However, I have never tried to see if it works flawlessly for the reason majorwoo gave.  Then any account on the system (including root) can be used to get to a share, and that should never be.
0
 

Expert Comment

by:ljeffries_linux
ID: 8048668
***1st rule of thumb - windows username and password must match the username and password in the linux server...kinda.  

If you connect with just the workgroup option, the username must  exist on the linux server. <useradd>.  You should have made the smbpasswd file <cat /etc/passwd | /usr/bin/mksmbpasswd.sh > /etc/samba/smbpasswd> (not using the first < and last >).  This transfers all of you listed linux users to samba.  Then for each user <smbpasswd username>.  You should be promted with "New SMB password:"  Type in the same password that matches the winx machine and the basic linux user password. (this just simplifies the process).  Retype the password and your done.

I also use the "USER" security level but have not been able to get any win2k or xp machine to logon (like a windows domain).  I can easily join the workgroup.  Also I'm not sure but I think "SHARE" access doesn't even require you to be part of the called workgroup.  "USER" access does.

Under windows (2K/XP) right click on My Computer, then properties, then the Computer Name tab , then change.  The windows machine should already have a name, click on workgroup and match the name listed in your smb.conf. file for the workgroup entry.  You should be rewarded with "Welcome to the whatever workgroup.  The you should be promted to reboot.

Make sure the usual problems like your firewall are set correctly to allow the win machine to access through.  Same in the /etc/host (192.xxx.xxx.x  Hostname).  I assume that you already have the smb script running.  If not, post back.

This is a great sight:
http://www.ibiblio.org/mdw/HOWTO/HOWTO-INDEX/howtos.html
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Expert Comment

by:BabuPrasanna
ID: 8048671
If you want to access samba in user mode, u need to create an account in the SAMBA server! for that i believe the command is smbadduser or sambaadduser.. please check it in the bin directory of the samba server!You will be prompted to map the samba-user name to your root account by specifying like, <samba-username>:<linux user name> as the command line arguement. You also need to supply the password! Create and account and try again! it worked for me!

good luck!
0
 

Author Comment

by:jl4k3
ID: 8052602
Thank you.  I ran smbpasswd -a <username> and I am now able to access the shares with User security.  Thought you should know that I have two books on Linux, each in excess of 800 pages.  Both books contain info on setting up Samba and recommend using User security (the default).  However, neither book mentions running smbpasswd -a in order to create Samba accounts for your users...Unbelievable!  I've also set up a separate account and am not using root.
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 8052642
yeah i found that one the hard way too ;-) About 2 years ago I decided to move our 20some machines that dualboot windows/redhat yo a samba PDC .. took almost a week of playing to get it working right ;-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question