Creating Network Shares

Asked by Erameh Alexander

Hi pals,
I typed sudo net rpc share add name="sharepath"
I got a message asking for the root password and I typed it, next I got a message saying “Netshareadd: access denied”
Why is access being denied to create share?

Alexander

Question information

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

Do you want to connect to a share or create a share on the system you are typing the command on?

Revision history for this message
Erameh Alexander (alexander-erameh) said :
#2

I want to create a share on the system I am typing the command on.

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of actionparsnip
Sent: Tuesday, September 08, 2009 2:46 PM
To: <email address hidden>
Subject: Re: [Question #82213]: Creating Network Shares

Your question #82213 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/82213

    Status: Open => Needs information

actionparsnip requested for more information:
Do you want to connect to a share or create a share on the system you
are typing the command on?

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/ubuntu/+question/82213

You received this question notification because you are a direct
subscriber of the question.

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

Then why not run:

sudo apt-get install samba

You can then use nautilus to configure shares, that or you can manually edit /etc/samba/smb.conf to contain the shares you wish. It wil need to have something like this to define your share:

[DOWNLOADS]
path = /home/andy
comment = Some stuff
browsable = yes
read only = no
writable = yes
valid users = andy
invalid users = root bin daemon nobody

The name in the bracket is the share name, the rest is self explanatory (if your user name isnt andy, and you wish to share your entire home directory then simply change the user name to what you use). You will also need to run:

sudo smbpasswd -a $USER

and type the same password for samba as you do to log on (makes life easier). This is now how you authenticate as your user to samba.

On a windows machine you can now map a network drive using the credentials or mount the shar ein linux, once typed the credentials will be stored in either OS.

You will also be able to casually browse them using

smb://<server name>/<sharename> in linux
or
\\<servername>\<sharename> in windows

Revision history for this message
Erameh Alexander (alexander-erameh) said :
#4

Thanks. This solves my problem

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of actionparsnip
Sent: Tuesday, September 08, 2009 4:09 PM
To: <email address hidden>
Subject: RE: [Question #82213]: Creating Network Shares

Your question #82213 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/82213

    Status: Open => Answered

actionparsnip proposed the following answer:
Then why not run:

sudo apt-get install samba

You can then use nautilus to configure shares, that or you can manually
edit /etc/samba/smb.conf to contain the shares you wish. It wil need to
have something like this to define your share:

[DOWNLOADS]
path = /home/andy
comment = Some stuff
browsable = yes
read only = no
writable = yes
valid users = andy
invalid users = root bin daemon nobody

The name in the bracket is the share name, the rest is self explanatory
(if your user name isnt andy, and you wish to share your entire home
directory then simply change the user name to what you use). You will
also need to run:

sudo smbpasswd -a $USER

and type the same password for samba as you do to log on (makes life
easier). This is now how you authenticate as your user to samba.

On a windows machine you can now map a network drive using the
credentials or mount the shar ein linux, once typed the credentials will
be stored in either OS.

You will also be able to casually browse them using

smb://<server name>/<sharename> in linux
or
\\<servername>\<sharename> in windows

--
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/82213/+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/82213

You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

Erameh Alexander please close this question marking as "Solved"

Thank you

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#6

To close the question please visit the launchpad link https://answers.launchpad.net/ubuntu/+question/82213 with your browser.

Revision history for this message
Erameh Alexander (alexander-erameh) said :
#7

Thanks marcobra (Marco Braida), that solved my question.

Revision history for this message
Erameh Alexander (alexander-erameh) said :
#8

Hi,

Assuming I type the command: cd /home/data/hr/staffsal/junior, what is the Linux command that will step me back to /home/data/hr/staffsal

Thanks

Alexander

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

cd ..

The space in important. It's

cd ..

not

cd..

Revision history for this message
Erameh Alexander (alexander-erameh) said :
#10

Thanks. Problem Solved.

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of actionparsnip
Sent: Tuesday, September 15, 2009 9:27 AM
To: <email address hidden>
Subject: Re: [Question #82213]: Stepping back from Nested folders one step at a time

Your question #82213 on samba in ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/samba/+question/82213

actionparsnip posted a new comment:
cd ..

The space in important. It's

cd ..

not

cd..

--
You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
Erameh Alexander (alexander-erameh) said :
#11

Hi,

I have two questions concerning Samba shares:

· Assuming I create a SAMBA share called DATA. This share is in the form /DATA/news/info/external.

   Now I want User A to have read and write access to the entire share, User B to have write access only to the external folder.

   and User C To have write access to news folder only.

   These users belong to different user groups.

· I have discovered that the group names I created in user-admin do not show when I am creating shares in SAMBA. How do I make the Group names

I created show when creating SAMBA shares.

Revision history for this message
Erameh Alexander (alexander-erameh) said :
#12

Can I please get some help on writing scripts?

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

Please log a new question regarding scripts as it does not relate to this thread