Results 1 to 10 of 21
Frustration with this issue is mounting and I'm fairly new when it comes to Samba and Ubuntu in general but I have 2 users setup on my Ubuntu box, user1 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-05-2012 #1
Samba Share Issues
Frustration with this issue is mounting and I'm fairly new when it comes to Samba and Ubuntu in general but I have 2 users setup on my Ubuntu box, user1 and user2. These same two users are added within Samba as well.
user1 is currently logged in on the machine and has an external hdd mounted.
I have a current share setup within Samba as the following:
[music]
comment = Music
browseable = yes
path = /media/MyPassport2/Music
read only = no
public = yes
guest = yes
create mask = 0777
directory mask = 0777
When connecting to this share from Windows 7, user1 can connect fine. user2 cannot access this share.
Does this have something to do with user1 having the drive mounted? Permissions issue possibly? Permissions issues on the Linux level and not Samba?
Any and all suggestions are welcome. As I said, I'm pretty much stuck.
Thanks!
- 03-05-2012 #2
Haven't you try Webmin GUI. A web based configuration tool for Linux
Webmin
From Webmin you can configure Samba
- 03-05-2012 #3Just Joined!
- Join Date
- Mar 2008
- Posts
- 18
Hi Muhnamana,
Can you please give us the mod and ownership of the music share (and its parents)?
ByeCode:ls -ld /{,media/{,MyPassport2/{,Music}}}
Santiago
- 03-05-2012 #4
Here you go.
drwxr-xr-x 23 root root 4096 2012-02-26 10:46 /
drwxr-xr-x 4 root root 4096 2012-03-03 21:57 /media/
drwx------ 1 administrator administrator 12288 2012-03-03 23:12 /media/MyPassport2/
drwx------ 1 administrator administrator 4096 2012-02-05 12:19 /media/MyPassport2/Music
I'm guessing its a permission issue but not sure how to add user2.
- 03-06-2012 #5Just Joined!
- Join Date
- Mar 2008
- Posts
- 18
What puzzles me is that I don't see how user1 can acces the share given the permissions?!?
My idea of a solution is:
1. Create a group music-share
2. Change the group owner of the Music share (and its descendants)Code:groupadd music-share
3. Allow anyone to cd to the share (they won't be able to read anything)Code:chgrp -R music-share /media/MyPassport2/Music
4. Allow the group to read and write the Music shareCode:chmod o+x /media/MyPassport2/
5. Add a user to the group:Code:find /media/MyPassport2/Music/ -type d -exec chmod u=rwx-s,g=rwxs,o= "{}" + find /media/MyPassport2/Music/ -type f -exec chmod u=rw-s,g=rw-s,o= "{}" +
Code:usermod -aG music-share user2
- 03-06-2012 #6
The only guess, is that the user1 (administrator) was logged onto the machine, which enabled user1 to also access this share via Windows 7. Just a guess but I'm still new to this so I could be wrong.
But I'll take your suggestions and apply this tonight when I get home from work. I'll let you know the results. I appreciate the help.
- 03-07-2012 #7
No good. See below for what I tried. I changed up a little of what you suggested, not sure if that was ok.
1.
2.Code:groupadd mypassport2
3.Code:chgrp -R mypassport2 /media/MyPassport2
4.Code:chmod o+x /media/MyPassport2/
5.Code:find /media/MyPassport2/ -type d -exec chmod u=rwx-s,g=rwxs,o= "{}" + find /media/MyPassport2/ -type f -exec chmod u=rw-s,g=rw-s,o= "{}" +
I just dont understand why this wont work. I'm using the mainly for backups, which I'm in need up desperately...hahaha. I dont like leaving all my eggs in one basket.Code:usermod -aG mypassport2 user2
- 03-07-2012 #8
Here's the ouput of the first command you suggested. I may have typed that on my other ubuntu box though but this is now the output from the box that has the MyPassport2.
Code:drwxr-xr-x 25 root root 4096 2012-03-05 19:50 / drwxr-xr-x 4 root root 4096 2012-03-06 20:10 /media/ drwx------ 1 administrator administrator 4096 2012-03-06 20:28 /media/MyPassport2/
- 03-07-2012 #9
Found an interesting option for the samba config file. If I use
and log into the share with user2's credentials, I can access the /media/MyPassport2 directory. I comment out this option, user2 now can't connect. Now I'm throughly confused.Code:force user = user1
- 03-07-2012 #10Just Joined!
- Join Date
- Mar 2008
- Posts
- 18
Hi Muhnamana,
Did you get any error when typing the commands groupadd, chgrp and chmod.
Because obviously, given the output of ls, no change was made at all.
force user is an dangerous option.
It means that any user will be able to access the share because it will be identified as user1.
Regards
Santiago


Reply With Quote

