LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Samba Permissions Issue... I'm So Close, Please Help! (https://www.linuxquestions.org/questions/debian-26/samba-permissions-issue-im-so-close-please-help-417245/)

balzack 02-19-2006 03:37 PM

Samba Permissions Issue... I'm So Close, Please Help!
 
hi-

MAIN PROBLEM: getting permission denied when trying to access linux shares from windows. also i'm prompted for username/password when connecting even though i have guest account on...

DETAILS:
i installed xebian (a distro of debian for the xbox) and following this great guide on toms hardware of how to setup samba shares on xebian using SWAT. i'm a linux n00b. tomsnetworking dot com/Sections-article151-page3.php

anyways i did everything it said and i've mounted my F drive to /mnt/F and i looked at it through SSH and it's all there, all the files and everything. i setup a share in SWAT, just like they said and did:

path = /mnt/F
read only = no
guest ok = yes

also my workgroup is set to workgroup and the guest account is root.

it looks good but i am trying to access this via windows and it's prompting me for a password when i go to:
\\192.168.1.101\ (ie my xbox ip)

i've tried all the accounts and passwords for xebian, root:xebian, live:live and lots of variations... nothing works. sucks cause i'm so close.

can anyone help me out? what am i doing wrong? why is it prompting me for a password if i've enabled guest access?

thanks a ton for any help!

dracae 02-19-2006 03:56 PM

You have to add samba users with smbpasswd on the host.
smbpasswd <windows username>

Also if you do not have a password set on your windows account, you will always be prompted for a username and password while trying to access shares

balzack 02-19-2006 04:08 PM

hmmm i'm not sure what you mean.

i have two accounts on the linux box.

root/xebian
live/live

on my windows box i have an account:
wahooka/*****

i ran:

smbpasswd root
changed the password to what it was

smbpasswd live
changed the password to what it was

smbpasswd wahooka
Error: Failed to initialise SAM_ACCOUNT for user wahooka. Does this user exist in the UNIX password database ?
Failed to modify password entry for user wahooka

i tried logging in again, still no luck.

did i misunderstand what you meant?

dracae 02-19-2006 04:12 PM

smbpasswd live should work, you may need to restart samba with
/etc/init.d/samba restart
You should then be able to log into you share with live

balzack 02-19-2006 04:20 PM

tried a restart, still no luck. being prompted and nothing works...

any idea why i am being prompted for a password if i enabled guest access? seems weird to me

balzack 02-19-2006 08:01 PM

tried changing security = share instead of user but that still didn't work.

guest user was root, i changed it to live which is another user account in xebian default install. after i did that, it works.

so to anyone else having this problem, security = share and guest account = live for sharing xbox drives with xebian.

Wells 02-20-2006 09:01 AM

Quote:

Originally Posted by balzack
tried changing security = share instead of user but that still didn't work.

guest user was root, i changed it to live which is another user account in xebian default install. after i did that, it works.

so to anyone else having this problem, security = share and guest account = live for sharing xbox drives with xebian.

Just wondering... what happens if you now change the security back to user instead of share, leaving the guest account set to live? Basically what I am trying to do here is narrow down the problem to just one variable instead of the two that you have propogated.

baikonur 02-20-2006 09:27 AM

mapping root as a guest will allow root only access to those shares which are defined: "guest ok = yes"

btw:

Quote:

smbpasswd wahooka
Error: Failed to initialise SAM_ACCOUNT for user wahooka. Does this user exist in the UNIX password database ?
Failed to modify password entry for user wahooka
that means you have to create a unix user w/ the name wahooka before you create the sambacaccount.
try: useradd wahooka; passwd wahooka
supply a password (anything)
then: smbpasswd wahooka
supply password (the real p-word)

Wells 02-20-2006 11:30 AM

Quote:

Originally Posted by baikonur
mapping root as a guest will allow root only access to those shares which are defined: "guest ok = yes"

btw:


that means you have to create a unix user w/ the name wahooka before you create the sambacaccount.
try: useradd wahooka; passwd wahooka
supply a password (anything)
then: smbpasswd wahooka
supply password (the real p-word)

Ooof... you may not want to do this at all. You may want to add just a samba account for the user and not ever create a unix based account for that particular user. In that case, what you can do is the following:

Code:

$ smbpasswd -a <username>
This will create a new user in the samba userfiles, leaving your unix user account listing alone.

baikonur 02-21-2006 02:00 AM

On my machines, I have to create a unix user first.
When I run smbpasswd -a <jamesbond> and jamesbond isn't a user on that unix system, I get the same message:

Failed to initialise SAM_ACCOUNT for user ...

Interesting that it works for you. How do you do that?
I'm running samba 3.0.14a-3 as a PDC on a patched debian sarge system, and I positively have to touch the unix user first.

or1onas 02-21-2006 08:41 AM

have you tried:
smbpasswd -a -e <username>
Just to make sure the user is also enabled..

baikonur 02-21-2006 08:53 AM

Same thing. I guess I'm missing something [global] in the smb.conf.
testparm says it's ok, and it is, because it works, but it would be
sweet to create the samba-users right away, in one step...


All times are GMT -5. The time now is 06:48 AM.