I can not get network shares to work right in opensuse. I searched the web for some inital insight and though i had it. Here is a list of where i am at.
First I setup samba… i think i set it up correctly…
I opened the samba configuration from yast and clicked the during boot option and open firewall port option.
From the shares tab i only selected allow users to share their directories.
From the Identity tab i chnaged the workgroup to my workgroup, not a DC, and set the netBIOS Hostname to something i could find. I left all the others at default.
Now go easy here… i tried to create a share within my home dir and it told me i didnt have the correct rights to do that. (would like to know how to do that…)
I then attempted to use the following command line i found on another site to share the folder i wanted to share… “net usershare add myshare /home/me/mysharefoldername”. It created a share folder, however i can not gain access to it.
I can also see a couple of other folders that i can not gain access to. In XP, it asks for a username and password… i tried my username/password, it didnt work. So i tried root/password and it didnt work either…
If you can not tell, i am completely lost. Show me the light please.
>
> I can not get network shares to work right in opensuse. I searched the
> web for some inital insight and though i had it. Here is a list of
> where i am at.
>
> First I setup samba… i think i set it up correctly…
> I opened the samba configuration from yast and clicked the during
> boot option and open firewall port option.
> From the shares tab i only selected allow users to share their
> directories.
> From the Identity tab i chnaged the workgroup to my workgroup, not
> a DC, and set the netBIOS Hostname to something i could find. I left
> all the others at default.
>
> Now go easy here… i tried to create a share within my home dir and it
> told me i didnt have the correct rights to do that. (would like to know
> how to do that…)
>
> I then attempted to use the following command line i found on another
> site to share the folder i wanted to share… “net usershare add myshare
> /home/me/mysharefoldername”. It created a share folder, however i can
> not gain access to it.
>
> I can also see a couple of other folders that i can not gain access to.
> In XP, it asks for a username and password… i tried my
> username/password, it didnt work. So i tried root/password and it didnt
> work either…
>
> If you can not tell, i am completely lost. Show me the light please.
>
>
You need to add Samba users. As root enter the following:
smbpasswd -a <username>
You will be prompted for a password for <username>. The password need not be
the same as the Linux password but <username> must be a valid Linux user.
Although not necessary, your Windows users will have an easier time if the
username/password pair you enter for them is the same as their login
username/password (Windows tries that first)
>
> that was it… thanks so much
>
>
Glad you have it working. Just incase you need any more information, Swerdna
has an excellent How To at: http://www.swerdna.net.au/linux.html
>
> hasty reply… how do i allow changes to the directories by the samba
> users? is there a gui for this somewhere?
>
>
If you have read the How To at Swerdna’s site (op. cit.) and are still having
problems, please post the contents of /etc/samba/smb.conf and more details of
what you are trying to do. There are a number of ways to configure shares in
Samba, unless we know what you are doing and what you want, it is hard to give
good advice
Here is the contents of the file. I have referenced swerdna, but i am puzzled by the term “superuser file manager” I searched and couldnt find it… newbie…
Anyway,
I have a share that i made using the command line “net usershare add myshare /home/me/mysharefoldername”
I want mysharefoldername to be readwrite access. Right now its only read access. But i dont see it in the listing.
I setup a user using the command line “smbpasswd -a <username>” and that worked fine, but how do i tie a share to a specific user / group and assign the proper rights per user/group.
smb.conf is the main Samba configuration file. You find a full commented
version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
samba-doc package is installed.
Date: 2008-05-28
[global]
workgroup = HOME
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
netbios name = LinuxBox
security = user
usershare max shares = 100
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
write list = david
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
I tried the right click approach, but it says i dont have the appropriate rights to set it up that way… i dont know what rights to give myself to allow the “right click” approach.
>
> Here is the contents of the file. I have referenced swerdna, but i am
> puzzled by the term “superuser file manager” I searched and couldnt
> find it… newbie…
>
> Anyway,
>
> I have a share that i made using the command line “net usershare add
> myshare /home/me/mysharefoldername”
>
> I want mysharefoldername to be readwrite access. Right now its only
> read access. But i dont see it in the listing.
>
> I setup a user using the command line “smbpasswd -a <username>” and
> that worked fine, but how do i tie a share to a specific user / group
> and assign the proper rights per user/group.
>
>
>
> # smb.conf is the main Samba configuration file. You find a full
> commented
> # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if
> the
> # samba-doc package is installed.
> # Date: 2008-05-28
> [global]
> workgroup = HOME
> printing = cups
> printcap name = cups
> printcap cache time = 750
> cups options = raw
> map to guest = Bad User
> include = /etc/samba/dhcp.conf
> logon path = \%L\profiles.msprofile
> logon home = \%L%U.9xprofile
> logon drive = P:
The above three (3) parameters are not needed for a workgroup configuration and
only needed for a domain.
> usershare allow guests = Yes
> add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody
> -s /bin/false %m$
The above parameter only applies to domains
> domain logons = No
> domain master = No
> netbios name = LinuxBox
> security = user
The above is the default
> usershare max shares = 100
> [homes]
> comment = Home Directories
> valid users = %S, %D%w%S
> browseable = No
> read only = No
> inherit acls = Yes
> write list = david
This is better:
[homes]
comment = Home Directories
valid users = %S, %D%w%S
read only = No
inherit acls = Yes
browseable = No
> [profiles]
> comment = Network Profiles Service
> path = %H
> read only = No
> store dos attributes = Yes
> create mask = 0600
> directory mask = 0700
This share only needed for Domains
> [users]
> comment = All users
> path = /home
> read only = No
> inherit acls = Yes
> veto files = /aquota.user/groups/shares/
Same as above
> [groups]
> comment = All groups
> path = /home/groups
> read only = No
> inherit acls = Yes
Same as above
> [printers]
> comment = All Printers
> path = /var/tmp
> printable = Yes
> create mask = 0600
> browseable = No
> [print$]
> comment = Printer Drivers
> path = /var/lib/samba/drivers
> write list = @ntadmin root
> force group = ntadmin
> create mask = 0664
> directory mask = 0775
>
> ## Share disabled by YaST
> # [netlogon]
>
Adding the following share should do what you want:
[MyShare]
comment = My Shares
path = /home/me/mysharefoldername
force user = david #or what ever your user name is
read only = No
inherit acls = Yes
force create mode = 0775
force directory mode = 02775
guest ok = yes
This will make a globally accessible share. Anyone connecting to this share
will become david and have the same rights. You can use Yast to add this share
or directly edit as root /etc/samba/smb.conf.
I see that Swerdna has replied, I will get out of the way for the next few hours
and let him help you. If you use KDE, the menu should contain an entry
for “File Manager Super User Mode” I’m not sure about Gnome.
Theer are two types of shares available in Suse. One is the classical share that P.V. speaks about. The other is the so-called “usershares” that are available courtesy of Gnome developers who have built a GUI for it into Nautilus. @stimphy, you started off trying to use thise and quite understandably became quickly confused when classical shares crept into the discussion.
What to do?? Let’s focus just on usershares and get that working, since you started with them.
Prerequisites:
Check that the directory “usershares” exists at location:
/var/lib/samba/usershares.
It usually does exist, but sometimes not, and if it doesn’t, let me know and I’ll advise further.
Edit the text file smb.conf by opening it with this command in a console:
gnomesu gedit /etc/samba/smb.conf
Under this line:
usershare max shares = 100
add this line:
usershare owner only = False
If this is openSUSE 11.0 then open the firewall one more place: GoTo Yast –> Security & users –> firewall –> Broadcast –> Add –> enter 0/0 as the entry. (also the zone should be external zone and the service Samba Browsing)
Sorry, external environment calls, I’ll post this so as not to lose it and continue later.
dont know if its the right way or not, but i logged on as root and changed the usershare file. There was a line that ended with R i changed it to F and now the folder is RW… I would really like a better solution than that, as its gotta be easier to share folders and manage the users/groups assigned to them…
I would really like a better solution than that, as its gotta be easier to share folders and manage the users/groups assigned to them
Well if you read the full tutorial it will outline (in addition to usershares) how to make classical shares, covering the Samba user database and how to secure shares, allowing only certain users. It’s a bit limited but it’s a start. I never seem to get the time to extend it.