Problems adding users to a Linux server

cadder

Distinguished
Nov 17, 2008
1,711
1
19,865
Our supplier sold us on switching to a Linux server so now we have Samba on SUSE Linux. We've been running it for about 5 years, and during that time period we have added a few more employees and some of our employees have scrapped their old computers and gotten new ones.

From what I understand we have user accounts in the server that match the machine name for each computer, and they authenticate according to a password built into the machine. When one user got a new computer we simply set his computer name and password to match his old machine and it connected.

Then another employee got a new computer and wanted to use a new name for it vs. the old name that he was using, so we added the new name to /etc/passwd and /etc/group, but it would not work. We instead have to connect that machine to the network using a batch file with commands such as "net use Z: \\serv1\z /u:Bob bobscatfred". This works if we use Bob's old username but doesn't work if we use Bob's new username. When trying to connect we get "system error 1219" "Multiple connections to a server by the same user, using more than one user name, are not allowed". I don't understand this because prior to running the command it had no drives connected to the server. How does Windows "remember" how a person was previously mapped to a drive?

Another issue I've had is that we wanted to change another user's acces to a share. Previously he had read only access, we wanted to give him write access. I go into /etc/samba/smb.conf and add his username to the write list for the share, but it doesn't work. I edit the file, restart Samba, still nothing. I don't know how to get Samba to allow him to connect.

I have previous experience with Unix so I knew how to add users in /etc/passwd and /etc/group, but in my researching and snooping WRT Linux I find additional files such as /etc/samba/smbpasswd and /etc/samba/smbusers. I'm not sure which of these I need to edit to add users, and do I do passwd, smbpasswd or both to change a user's password?

I have stayed away from Linux for a long time due to my unpleasant experiences with Unix, but I can fight it off any more. Our supplier won't support our Linux server, I can't find anybody else to hire to do it, so I will have to do it. Unfortunately there is such a huge volume of stuff on the internet about Linux that it is very hard to just find the answer to a question.
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
OK, some answers to some of your questions:

1) Unless you've setup unix->samaba password synchronization, you need to update the user's samba password with smbpasswd <username>

2) The smbuser file is simply to aid in mapping a samba user to a unix user, for example if you didn't want to create a unix user simply to give access to someone but allow more than guest access.

3) Unsure what the issue is with the permissions issue, but you should probably take a look in the samba logfiles to see what's happening right after a write operation is attempted and fails.
 

cadder

Distinguished
Nov 17, 2008
1,711
1
19,865
After some research, study and thought I've solved some or all of my issues.

1) I did a lot of study of Linux and Samba to cure the 1219 error, then I got the idea to google "1219 error" and I found some help. I was disconnecting my shares and trying to reconnect with the new user name when I would get this error. Most of my research said to do "net use * /del" but this didn't work for me. Some people said to reboot and that did work. My shares would reconnect upon reboot but if I disconnected them first, then rebooted, they wouldn't reconnect and I could connect with the new credentials.

2) I had added a user in /etc/passwd and /etc/group. I tried to add a user password using "smbpasswd" but finally discovered that it won't add a password for a user that doesn't exist. I added the user, then the password, and that worked.

3) Another proglem was that one of my users couldn't connect to a share, but Samba's config file seemed to be set up properly. Then I discovered that Unix file and directory permissions supercede anything set in Samba. This might be my last significant problem.