simple question

hi all
im completely new to Linux (about 5 days). i have a question about sharing and user permissions.
1: i want to share a folder that can be use (read & write) in windows system, so i created a folder and tried to use samba for sharing and its shared but when i try to open that folder from windows it says you don’t have permission (for the user i created before) but i can open that with root user and password with some change in etc/smb.conf file (there was a line that said: sharing disabled by Yast! what is that mean? i just deleted that line so i can access the folder by root user)… its strange for me. did i done something wrong or i must do more things?

2:i want to have some users to just can access their specific folders via sharing, and cant use vnc or console to connect to Linux, how can i do that? how can i assign permissions to users?

and is it possible to do that things in GUI mode(kde or gnome)?

Ty all

Your question is about Samba. Wouldn’t it have been better to mention at least the word Samba in your Title? I would think that people knowing a lot aout Samba are coming to your help sooner when seeing "Samba … " then when seeing “simple question”.

its not. as i said im new, so i just know samba . with my information about suse there are more ways but i did it with samba cuz i just know that. i would be glad if some one help me to know the other ways.

I am afraid you do not understand me. When you make a thread with title “simple question”" that is NOT a good title. I see a list of new threads before me with only the titles. Now I have to decide which one I would try to read. Many people decide to go to a thread when they see a title about something they know about.

I, for example would not go to a thread with “Samba” in it because I do not use Samba.
I, for example often go to threads having “Problem with mounting” in it, because I think I know a lot about partition mounting.

Now please decide for your self, who would go to a thread with title “simple question”?

rezakoohi wrote:
> its not. as i said im new, so i just know samba . with my information
> about suse there are more ways but i did it with samba cuz i just know
> that. i would be glad if some one help me to know the other ways.

i never run windows so know most of nothing about it, BUT there is a
mod here who knows a lot about windows and samba…i suggest you go to
http://www.swerdna.net.au/linux.html where, in the top left quadrant
you see a section named “SAMBA: BROWSING & SHARING” i know many folks
have found happiness there…

and, if you do you should probably click on the link just above that
quadrant which says “How you can help”

disclosure: i have no financial ties to swerdna.net.au


palladium

hcw is right, “simple question” isn’t good title for a topic because it says nothing about your problem. “Question about file sharing and user permissions” would be much better.

In openSUSE you can make many administrative tasks through YaST. There is also module for SAMBA configuration in it.

rezakoohi wrote:
> hi all
> im completely new to Linux (about 5 days). i have a question about
> sharing and user permissions.
> 1: i want to share a folder that can be use (read & write) in windows
> system,

  1. Use YaST to configure the share:
    YaST > Network Services > Samba Server

If it’s not there you need to install ‘yast2-samba-server’ and restart YaST.

When the share(s) is fine

  1. create samba user(s). A samba user can (but does not have to) the
    same as your normal user(s), but they need to exist.

You create one by typing in konsole as root:smbpasswd -a username
You will be prompted for a password for the user (twice) type the
password and hit enter (twice)

The usernames and passwords can be same as real system users, but you
can also have samba users who are not system users, only samba users.

Next these samba users must connect to the shares by using their
usernames and passwords. In windows this is not always the case, people
often don’t use passwords. This is a big no-no but that’s another story.

When connecting to a samba share on a Linux server they just have to use
username and password.

>
> 2:i want to have some users to just can access their specific folders
> via sharing, and cant use vnc or console to connect to Linux, how can i
> do that? how can i assign permissions to users?

When a user is a samba user with username and password he can connect to
the shares. If he is not a system user he can not do anything else.

So you make system users who can do stuff and samba users who can not.
>
> and is it possible to do that things in GUI mode(kde or gnome)?

Everything else above goes via YaST > Samba server
but the usernames and passwords you create in commandline.

Vahis

“Sunrise 8:24am (EET), sunset 3:44pm (EET) at Espoo, Finland (7:20 hours
daylight)”
http://waxborg.servepics.com
Linux 2.6.25.20-0.5-default #1 SMP 2009-08-14 01:48:11 +0200 x86_64
6:21pm up 16 days 23:22, 10 users, load average: 0.08, 0.13, 0.09

thanks a lot vahis…
that was a nice explanation.

and sorry for bad title.

rezakoohi wrote:
> thanks a lot vahis…
> that was a nice explanation.
>
> and sorry for bad title.
>
>
Did you manage to get it to work?

Vahis

“Sunrise 8:27am (EET), sunset 3:43pm (EET) at Espoo, Finland (7:15 hours
daylight)”
http://waxborg.servepics.com
Linux 2.6.25.20-0.5-default #1 SMP 2009-08-14 01:48:11 +0200 x86_64
9:23am up 17 days 14:24, 10 users, load average: 0.00, 0.05, 0.07

i tried as you said and created a group named sharing then put the user (test) in that group then used konsole for smbpasswd -a (test) and then passwords so they are created. and in smbpassd file i saw that user with encrypted password.
its all ok till here. but i still have the problem. when i want to open the folder in windows it says you dont have permission!

HELP!!!

rezakoohi wrote:
> i tried as you said and created a group named sharing then put the user
> (test) in that group

I’ve never created such a group. Just users.

then used konsole for smbpasswd -a (test) and then
> passwords so they are created. and in smbpassd file i saw that user with
> encrypted password.
> its all ok till here. but i still have the problem. when i want to open
> the folder in windows it says you dont have permission!
>
>
Where are you trying to connect from? Windows via ‘map network drive’?

What are you doing to connect?

Vahis

“Sunrise 8:27am (EET), sunset 3:43pm (EET) at Espoo, Finland (7:15 hours
daylight)”
http://waxborg.servepics.com
Linux 2.6.25.20-0.5-default #1 SMP 2009-08-14 01:48:11 +0200 x86_64
4:28pm up 17 days 21:29, 5 users, load average: 0.12, 0.25, 0.20

On Tue November 17 2009 05:06 am, rezakoohi wrote:

>
> i tried as you said and created a group named sharing then put the user
> (test) in that group then used konsole for smbpasswd -a (test) and then
> passwords so they are created. and in smbpassd file i saw that user with
> encrypted password.
> its all ok till here. but i still have the problem. when i want to open
> the folder in windows it says you dont have permission!
>
>
> HELP!!!
>
>
rezakoohi;

Have you read Swerdna’s HowTo(s)?
http://opensuse.swerdna.org/suselanprimer.html

and also:
http://opensuse.swerdna.org/susesambaserver.html

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

i try to connect to SUSE from windows–>run–>//1.1.1.1(Linux ip)
and when i use this it shows me the Linux shared folders but don’t let me in with created user except root.

and yes i saw that pages but im new to Linux so i cant understand commands well.

but i saw something last day. i created a user (aaa for example) and i created a share folder in that user desktop folder (/desktops/aaa) and when i tried to open it from windows it worked. i guess if i want to share a folder in /root i must change /root permissions. right?

its getting harder and im so confused… :confused:

forgot to say
when you create user it must be in group cuz if you don’t put it in a group it will go to default group. is it right?!

On Tue November 17 2009 11:46 pm, rezakoohi wrote:

>
> i try to connect to SUSE from windows–>run–>//1.1.1.1(Linux ip)
> and when i use this it shows me the Linux shared folders but don’t let
> me in with created user except root.
>
> and yes i saw that pages but im new to Linux so i cant understand
> commands well.
>
> but i saw something last day. i created a user (aaa for example) and i
> created a share folder in that user desktop folder (/desktops/aaa) and
> when i tried to open it from windows it worked. i guess if i want to
> share a folder in /root i must change /root permissions. right?
>
> its getting harder and im so confused… :confused:
>
>
rezakoohi;

You should NEVER allow shares in /root. Allowing access to /root is a real
security problem. If you want user defined shares, they belong in a users
home directory NOT roots. Although it is customary for Window’s users to run
with administrative permissions, this is the primary cause of the security
problems with Windows. It is never wise to logon to Linux as root. When you
need root privilege use one of:
su
sudo
gnomesu
kdesu
from a user account.

Samba must obey the underlying Linux permissions so when you setup shares make
sure your directories have permissions set that will allow the access.

The users you create with “smbpasswd -a” must be valid Linux users, the
password you give them need not be their Linux password. By default,
Windows sends the username/password of the Windows user, so life is easier if
your Windows users and your Linux users have the same name and the smbpasswd
you give the user agrees with their Windows login password.

Whatever you do, DO NOT CREATE SHARES IN /root!!!


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

On Wed November 18 2009 12:16 am, rezakoohi wrote:

>
> forgot to say
> when you create user it must be in group cuz if you don’t put it in a
> group it will go to default group. is it right?!
>
>
rezakoohi;

Sorry to have scolded to much in my earlier post. But reading what your post
was a bit like having your 16 year old daughter tell you about her new 24
year old boy friend. There is a learning curve in Linux and you are doing
just fine.

As to groups. The users you create will be in the “users” group by default.
You can add them to additional groups if you desire. It is not wise to add
them to the root group.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Ahhh. i thought i can learn linux by my self but its hard without any experience, besides that im a little unintelligent.

so root is administrator right? and users is like guest. so i create a group for my **** users and put them there. (can i manage permissions on groups instead of users? and if i can where?)

ok so lets try this.
if i fail this time i will kill myself.:’(

Kind of drastic!! your learning a machine which is just a fast idiot. Without software it just:
goto memory get instruction, instruction says mov bx,[di] or something like that (00 00 ), get next which is also (00 00) do until power off!
You really think it’s more intelligent than you?

root = administrator
user = you
group = way to manage many users
CLI = Command Line Interface commonly used in a terminal
GUI = Graphical User Interface = point and click (issues CLI commands in responce to your actions)
Visible Desktop = screen in front of you
Other Desktops = 1 to 8 others (generally used to keep organized when many apps are running)
YAST = Yet Another System Tool used to work with Software, Hardware, Security, Networks, and USERS! and much more
Desktop Manager = Gnome, KDE, Xfce …

people here will help you just ask!

ok… im not that stupid as i said ;). now i use a fresh installation of suse. i created user X and it belongs to users group. its ok with sharing and remote accessing. now i want to make it to just use a share folder that I create for him and disable the remote access for this user.

how?!

and hooray i find that if i make a folder in /root/desktop the X user cant log in to it. but if i create it in /home he can log in… GOD my IQ is near 500 rotfl!

Select the folder under /home/<user>/<foldername> rightclick and choose properties. under permissions you can set who has the right to read, write, execute for owner, group, others. I beleave you can also hide it so the person needs to know it’s there as well. drwxr----- = owner can do everything, group can read and all others locked out! Thusly, unless folder is shared, only the owner-user can modify it. any other user can’t get into your /home/<user> unless they are a member of your group and the folder is shared.