LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2006, 07:03 AM   #1
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Rep: Reputation: 15
Generic accounts in Samba


Hi
I have samba running on one of my servers at work. I have been requested to give 50 users access to one share on the server. Rather than creating individual samba accounts for the 50 users I was wondering if it was possible to create a generic samba login to this share so users can simultaniously access it?
Any help will be much much appreciated.
 
Old 02-20-2006, 07:42 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
The only problem I see is you will not have control who will access your system. If the access to this machines is restrict, and the lan access is limited then that would be fine.
The problem is if you have broad access over several rooms without access control, then some one could access your shares by using that well known username/password without your knownledge and control.
 
Old 02-20-2006, 08:31 AM   #3
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
Thank you for your response marozsas,

I understand about the security side of things as the mapping to this share drive folder iam trying to create will be created on personal laptops so I will not really have controls of the users computers however they will only have read permission on the share folder itself on the server. Also the lan access is limited in the sense that users have to be on site to access to the server. As far as the data concerened that will be enough security. The only issue is I am not sure in how to go about creating a generic account in Samba to implment the above.
Any help will be much appreciated.
 
Old 02-20-2006, 08:54 AM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Create a generic unix account into the samba server and add the same account to the samba by issuing the command "smbpasswd -a generic_account_name".
Create the share that looks like this:
Code:
[GenericArea]
        comment = Generic Area
        path = /export/samba/commom
        valid users = generic_account_name
        force user = generic_account_name
        force group = generic_group_account_name
        read only = Yes
The valid users limits who can access the share. In your case it is only one user.
The force lines sets the user and group, just in case.

I hope this helps,
 
Old 02-20-2006, 09:04 AM   #5
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
Thanks alot marozsas :0)
iam gonna give it a shot and then let you know how it goes
cheers
 
Old 02-20-2006, 09:34 AM   #6
Dmjmusser
Member
 
Registered: Nov 2005
Location: Detroit, Michigan -- USA
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
Would it make security too loose to just set up a public share with read-only access? That would make logons entirely unnecessary, and a user would be able to access the share just by knowing the server name or ip address.

~Myles
 
Old 02-20-2006, 11:06 AM   #7
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
I see what your saying Dmjmusser. The only issue is that that makes is possible for anyone on campus to have access to that data, which I would rather avoid if i can
 
Old 02-20-2006, 12:53 PM   #8
Dmjmusser
Member
 
Registered: Nov 2005
Location: Detroit, Michigan -- USA
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
Ah, gotcha. Didn't figure it was too much of an issue since security for your share seemed to be so low anywhos.

~Myles
 
Old 02-22-2006, 09:24 AM   #9
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
marozsas, I tried the above suggested with the following lines added to smb.conf:

[genaccesstoipri]
comment = generic ipri access for postgrads
path = /home/share/ipri
valid users = useripri
force user = useripri
force group = genaccesstoipri
read only = Yes

I also created a unix account via the useradd command and the samba account via the command smbpasswd -a generic_account_name however didnt have any luck. I feel I have made an obvious mistake somewhere but being the idiot iam i cant seem to find it. Any idea?.....

Last edited by fedora_user; 02-22-2006 at 09:31 AM.
 
Old 02-22-2006, 09:52 AM   #10
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
From the samba server, as a regular user, try to have access to the share by issuing the command "smbclient //localhost/genaccesstoipri -U useripri%password_for_this_user". If you succeed, you will get the "smb: \>" prompt. Try a "ls" command to list the share contents, "cd" to navigate, rename, put and get commands. This is more like ftp get/put commands. The put command will fail since is a read only share.

If this works, then you have access to the share by SMB protocol.

If not, please, be more specific about what's wrong. All information is important to helps us to figure out where is the problem.

see'ya,
 
Old 02-22-2006, 09:53 AM   #11
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
By the way, the directory /home/share/ipri on server must be owned by useripri, group genaccesstoipri and it must have at least rwx permission to owner.
 
Old 02-22-2006, 10:16 AM   #12
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
thanks for that..iam gonna give it another shot )
 
Old 02-22-2006, 10:53 AM   #13
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
Ive realised that useripri and group genaccesstoipri cannot own ipri directory. There is already an owner of the directory /home/share/ipri and a group called ipri. I could add this account useripri to this group but this group in fact gives its users rwx rights to this directory, which is not what I want for the user useripri. The group iam referring to is:

[ipri]
comment = IPRI
path = /home/share/ipri
valid users = @ipri
writeable = yes
write list = jay librarian

Is there a way useripri can be part of this group but only have read options to the directory /home/share/ipri??

Sorry marozsas if iam not being clear enough...iam learning-lol
 
  


Reply



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 accounts/ unix accounts Buzz88 Linux - Newbie 3 09-25-2005 08:16 AM
Are Samba Accounts Necessary? estyne Linux - General 2 08-23-2005 04:27 PM
add more xp accounts to samba rulirahm Linux - Networking 3 07-20-2005 10:02 PM
Samba and accounts eranj Linux - Networking 1 06-10-2005 12:07 AM
Samba user accounts broxys Linux - Networking 1 08-16-2003 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:37 AM.

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