How to set authentication in samba share

Asked by aneesh

I have shared my folder to the network through samba . Now I want to authenticate every user who has try to access my shared folder .How to set authentication for samba share

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

sudo smbpasswd -a $USER

Set the password the same as the one you log in as. You can now authenticate as that user (ou will be challenged for credentials when you connect and youcan tell ANY OS to remember them indefinately). I'm guessing you have shared /home/$USER as this is what happens and the smbpasswd is needed.

Revision history for this message
aneesh (aneesholv) said :
#2

Hai

sudo smbpasswd -a $USER
 In the above command what is mean by " $USER" and one more doubt ,we
have typed this command in terminal, is it lost when system rebooted ? Then
how can save the samba password permenantly ? please help me

On Thu, May 6, 2010 at 5:53 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #109881 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/109881
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> sudo smbpasswd -a $USER
>
> Set the password the same as the one you log in as. You can now
> authenticate as that user (ou will be challenged for credentials when
> you connect and youcan tell ANY OS to remember them indefinately). I'm
> guessing you have shared /home/$USER as this is what happens and the
> smbpasswd is needed.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/109881/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/109881
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
------with regards,

                      Aneesh.T.V
                      Mob:9544067525

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

no the password is resolved. If you want to see what user is you can run:

echo $USER

It basically resolves to the name of the user running the comand and makes writing commands in terminal easier as you don't have to worry about what the username is. I have no way of knowing your login name, and neith do I have to. $USER handles it for us

The password is saved permanently just like your logon password.

Revision history for this message
aneesh (aneesholv) said :
#4

Please also tell me about the use of smbpasswd file

 thanks

On Thu, May 6, 2010 at 6:29 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #109881 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/109881
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> no the password is resolved. If you want to see what user is you can
> run:
>
> echo $USER
>
> It basically resolves to the name of the user running the comand and
> makes writing commands in terminal easier as you don't have to worry
> about what the username is. I have no way of knowing your login name,
> and neith do I have to. $USER handles it for us
>
> The password is saved permanently just like your logon password.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/109881/+confirm?answer_id=2
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/109881
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
------with regards,

                      Aneesh.T.V

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#5

smbpasswd is a command to add authentication to samba shares. smbpasswd is just a command

Revision history for this message
aneesh (aneesholv) said :
#6

thanks alot