LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2006, 05:50 AM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
About private shares in Samba


Hi.. Ive got Samba up and running but Ive just one simple question.Ive Got a linux fileserver and two XPs at home...Ive Got 4 users for the two XPs but all of them use the same profile "i.e. no different login and usernames" when you start the XP it just opens a profile and you start using the PC..the question is in Samba if I want to create a private share for each of the users...can I do that and then add the user to the samba users..or does the user have to have a windows login username that matches the user who is assigned the samba share in smb.conf

Can I create 4 shares for users A B C D ...and let the owner of the share use his share from anywhere on the network

And please could someone tell me how to set the permissions for the directories if it works

Last edited by ALInux; 04-02-2006 at 05:55 AM.
 
Old 04-03-2006, 12:34 AM   #2
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
So, does that mean you want to have 2 (or more) users with the same smb username but with different passwords? If you mean that, I'm afraid it wouldn't work, because you need different passwords for different users, at least if you create the user in /etc/passwd (through #useradd user). But I might be wrong. Maybe there is a workaround, that I'm not aware of.
 
Old 04-03-2006, 04:07 AM   #3
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
You mean if I use security = user
but what if I use security = share
 
Old 04-03-2006, 08:28 AM   #4
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
Yes, you can do that.

Just add them to Samba (smbpasswd -a (blahuser)), then create a folder for them on the server (in the example, //home/blahuser). When they pass their credentials, you can have Samba direct them to a folder no problem.

Something like this will direct a user to a directory under the /home share with their username, then make them the owner of the file and no one else will be able to open it.

Code:
[Users]
        comment = User files
        path = /home/%U
        public = no
        read only = no
        writable = yes
        browseable = yes
        create mode = 0700
        force create mode = 0700
        directory mask = 0700
        force group = users
That's a modification of what I use on my Samba server at home. No matter if a user browses to that share or if they type it into the run box (ie, \\servername\users), it will redirect them to /home/username. That's how I keep my wife out of my home directory and vice versa.

Also, security = share is a pain in the arse.

Last edited by ARC1450; 04-03-2006 at 08:37 AM.
 
Old 04-03-2006, 11:52 AM   #5
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
So I have to create the corresponding linux users first..right..? Or do I just have to create the directories in the /home directory ?

Also, security = share is a pain in the arse. "and I must set security to user"
 
Old 04-03-2006, 01:27 PM   #6
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
You need a Linux account. "useradd -d /dev/null -s /bin/false (username) && passwd (username)" is a great way to do it. Just give them some crap password, as it really just needs an account for the smbpasswd -a.

Then create the directory in /home (make sure it's spelled exactly like the username).
 
Old 04-03-2006, 03:11 PM   #7
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
Ok I will try that and get back to you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba not working as intended. Private / Public share's ILikeVoltron Linux - Networking 3 03-14-2006 04:22 PM
Samba - Guest and private in same config? Ponder Linux - Networking 2 12-14-2005 01:30 AM
Samba 3.0.6 - How to mount Samba Shares from Windows 2003? kp1 Linux - Software 2 09-10-2004 06:03 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration