?
Solved

Problem with SAMBA Authentication

Posted on 2003-02-28
6
Medium Priority
?
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, left to enroll

777 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