0

Ok, so I have added two users to samba, user1 and user2.

I've also added a couple of different shares, with different path locations.

I am connecting from a Windows XP machine. User1 can connect to all shares with the proper username and password.

When trying to connect to those same shares with User2's usernames and password, I can't connect to any share, only the home directory.

Can someone lend some assistance to this?

Luis Alvarado
  • 211,503
Muhnamana
  • 1,816

1 Answers1

1

I am assuming that those same shared resources that User1 has access to might not have permissions for User2.

What I recommend is going to this shared resources and adding permissions for User2. This should fix the problem which is a very common one that all people (me) do it some time (all the time for me).

Some ideas might be adding both users to a same group that has access to this same resources.

To add for example user "user2" to group "user1" you might use something like this:

useradd -aG user1 user2 - Where user1 is the group name and user2 is the user name.

Remember that when using adminstrative commands, you need to prefix them with the command sudo. For example, the above would be sudo useradd -aG user1 user2

Another tip to help and check quickly would be to allow complete access. This is just a test to see if the problem is permissions. For example if you external unit is mounting in /media/My Passport 1 you would do something like this sudo chmod 777 "/media/My Passport 1". Why the double quotes you may ask. this is because My Passport 1 has spaces between it. This is a quick and dirty way but other ways like /media/My\ Passport\ 1 also exist.

I also recommend opening the GUI tool "Disk utility" and changing the label from "My Passport 1" to a one word name, like "Stuff" or "Photos". Open the DASH many and type disk. It should bring an icon called Disk Utility. Open it and from there you should find your drive, change the label from the one you have to a shorter, easier one.

Luis Alvarado
  • 211,503
  • How would I modify the permissions? – Muhnamana Feb 13 '12 at 01:03
  • One share is an external HDD and the others are 2 folders shared on another external HDD. – Muhnamana Feb 13 '12 at 01:04
  • Ok, so I found the permissions tab on the external drive. I see user1 listed as the group. If I try and change the group to something different, like sambashare, it keeps reverting back to user1. – Muhnamana Feb 13 '12 at 01:07
  • I tried that but it returns "useradd: user User1 already exists. – Muhnamana Feb 13 '12 at 01:30
  • I've never used that before but am I right in the following: chmod 777 /media/My Passport 1? – Muhnamana Feb 13 '12 at 01:55
  • Added help for chmod and useradd. Some tips to use them also. – Luis Alvarado Feb 13 '12 at 02:05
  • Ok, so I ran the following command: sudo chmod 777 /media/MyPassport1 and returned no errors and returned back to the command prompt. I assume that check is ok? – Muhnamana Feb 13 '12 at 02:17
  • I dont know man, I'm stuck. I think it has something to do with User2, when logged in cant connect to the drives. – Muhnamana Feb 13 '12 at 03:25
  • Can you create a new user and see if that new user can at least access the drives before going with the samba sharing steps. – Luis Alvarado Feb 13 '12 at 04:38
  • No, a new user cant access the drives, only User1 can access the drives from the desktop. At this point I've been running through circles that I dont know which way to go...haha! – Muhnamana Feb 13 '12 at 12:30
  • Does Ubuntu actually mount the drives and did you, after mounting, apply the chmod to the mounted drive. – Luis Alvarado Feb 13 '12 at 15:27
  • I found a GUI, called PySDM. I'm testing on my laptop at work and there are some settings within that GUI to allow all users to mount on boot. Seems as though my permissions are now added as "root". I'll try this at home tonight and see what happens. – Muhnamana Feb 13 '12 at 16:58