Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
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 just installed a Dell Power Edge server with Red Hat Es installed. It is being used as a file server. I had samba working like a champ. I setup two users using the following set of commands:
useradd -m user
passwd userpassword
smbpasswd -a userpassword
The two users were able to log in to their Windows workstation and access the server with out any issues. Happiness was abundant.
I downloaded the latest samba update from Red Hat.
Now when I use the same commands above the user does not appear in etc/samba/smbusers and the new users cant log in from Windows.
The old users still log in and use the shares just fine.
I looked up this issue on Red Hats website and it seems to be a known issue. The instruction's pointed to using the command:
smbpasswd -a
and explained that this should work like a champ, it didn't.
Now I am full of self doubt and unhappiness.
Maybe it is my smb.conf file.
So here it is:
# smb.conf is the main Samba configuration file.
# Date: 2005-02-12
[global]
workgroup = LBR
os level = 2
time server = Yes
unix extensions = Yes
map to guest = Bad User
printing = CUPS
printcap name = CUPS
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
wins support = No
veto files = /*.eml/*.nws/riched20.dll/*.{*}/
server string = File Server
add user script =
domain master = false
domain logons = no
local master = no
username map = /etc/samba/smbusers
preferred master = auto
;; ldap server = 127.0.0.1
[homes]
comment = Home Directories
valid users = %S
browseable = no
writeable = yes
create mask = 0640
directory mask = 0750
printable = no
[printers]
comment = All Printers
path = /var/tmp
printable = yes
create mask = 0600
browseable = no
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
browseable = yes
printable = no
[ray_share]
path = /home/ray
comment = /home/ray
writeable = yes
create mask = 0640
force user = ray
guest ok = no
wide links = no
browseable = yes
valid users = ray
printable = no
[company]
comment = Company Documents
path = /home/company
writeable = yes
guest ok = yes
The file server is supposed to be up and running Monday and I am not sure where to turn.
I hope I have posted this issue in the right forum and provided enough info.
I can't see anything obviously wrong with your smb.conf (but I'd suggest using the supplied testparm utility to sanity check it anyway).
When the last Samba update but one killed authentication on my main server I downloaded the RPMs for the working version from RHN and reinstalled them with rpm --oldpackage. This is a possible fallback if you are really stuck. The absolute latest Samba update does work for me, though.
Two other suggestions:
- I think that one of the changes with the latest version of Samba is that the handling of case is different (can't remember the details), so ensure that the usernames are all lower-case with no non-standard characters.
- If you can post the BugZilla number or relevent messages from the log files then somebody here will be able to decipher what it means.
Of course if you've paid for Red Hat support, you can ask them as well !
hob,
Thanks for the reply. I did uses testparm and it had no complaints. I felt like my smb.conf file was good because the original two users I added are still able to access the server and their files without any issues.
I am not sure that even the log files have any errors.
It's very strange. The main issue is that when I add a samba user using any method I know of, they dont appear in the samba users file.
How many ways are there to add a user? Should I delete the list of users and their passwords from the respective samba files and start again maybe?
The main issue is that when I add a samba user using any method I know of, they dont appear in the samba users file.
I *think* that the supplied Samba utilities access the Samba service to make changes to the accounts, even when they are executed on the same machine, so I would check that the firewall isn't blocking access to Samba from the local host itself.
It's also worth restarting the service (if you haven't yet) to ensure that the live config does match the file.
The other obvious thing is permissions on the Samba files may be wrong.
Failing that, you could copy your existing config away and try with a minimal config to test whether it can work at all.
Obviously, it would be bad if you have to recreate your Samba accounts to make things work
Ok, I am not sure if anyone else is experiencing this problem but here is what I did to work around it.
I tried multiple ways to add a user to samba (all users were already added as Red Hat users) I used the smpasswd –a *username* command and I also tried using system-config-samba. Both ways did not create a user in the /etc/samba/smbusers file. They were, however, successful in creating the password in the /etc/samba/smbpasswd file. I checked to make sure I was root, I checked the permissions on the /etc/samba/smbusers file. All looked right. I double checked the firewall and it was disabled. I restarted samba, I put a minimal samba file in place:
I ran testparm and it never complained.
I put my old smb.conf file back in place.
Out of desperation I went into the /etc/samba/smbusers file and added the user names manually:
user1 = user1
user2 = user2
user3 = user3
and so on.
I ran smpasswd –a for each user to ensure that the /etc/samba/smbpasswd file was accurate, then restarted samba.
I fearfully and cautiously approached a nearby XP workstation that I had been using to test, logged in as user1 with my password, double clicked on the file server and after a brief reentry of user name and password I was in. Each workstation required one authentication upon initial log onto the file server. After that, it never prompted for user name and password after logging onto Windows.
I have rebooted the server and multiple workstations and all seems well.
Thanks to all who posted replies and helped me feel like I wasn’t all alone on this!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.