LinuxQuestions.org
Review your favorite Linux distribution.
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 01-16-2007, 03:50 PM   #1
knightbyrd9
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
Limit User Logon Per Machine


I know it's available in Windows 2003 but I was wondering if it was possible in Linux to limit who can log on from what workstation in a Samba controlled PDC setup.

I am trying to convert a W2k3 to Samba and that is an important part needed to get approval for this.

If there is an how-to that I could not find, I'd appreciate a link to it because all the searches I've put in for only resulted in things that did not address this.

Thanks.
 
Old 01-17-2007, 11:18 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
I think you can do it with pam. The file you will need to modify is /etc/pam.d/samba. With pam can do things like that; specify who can login and at what times and from which host.
 
Old 01-17-2007, 12:34 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
From a howto:
Quote:
Linux provides a variety of PAM modules for doing authorization. Peruse /usr/share/doc/pam-*/txts/* on a Red Hat box to see all of the available options. The one that seemed to be the best fit for me was pam_access. First you add an entry like this to /etc/pam.d/system-auth:

account required /lib/security/pam_access.so

Then add appropriate entries to /etc/security/access.conf. Here's a sample:

# Allow only a few users to login
-:ALL EXCEPT root joe bob jane:ALL
An entry the begins with a "+" could allow users and groups and the EXCEPT would exclude. The example above does the opposite, denying ALL except, which generally is a better strategy. Also please read the samba documentation. PAM and tcp_wrapper support is built into samba so the smb.conf file may be a better place to do this.
Also look into /etc/pam.d/login and /etc/pam.d/system-auth.

Reading up on PAM, the NAG guide from the www.tldp.org website, and the Samba 3 books (which you can download from the Samba.org website) would probably be a good idea. Aside from limiting access to samba shares or limiting the times of logins, you also need to be concerned with the security of the server itself, such as locking down ssh access and securing MySQL if it is used.

Alot depends on the size of your organization and the networking technology you are using or will be using. For example, do you use domain controllers as in an XP network, or do you want to replace a ADC based system (WIN2000).

The "Samba 3 by Example" book has several sample configurations, with step by step instructions. The Samba 3 Reference and Howto has a lot of necessary background information.

Last edited by jschiwal; 01-17-2007 at 01:27 PM.
 
Old 01-17-2007, 02:26 PM   #4
knightbyrd9
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Original Poster
Rep: Reputation: 0
ramram and js,

Thanks a lot. I was on my way back to mention that PAM seems to be the way to go but see you both posted before I did.

I can't say it totally worked yet because I had to start the system over again from scratch. (No big deal because using a test machine to get it running first before I replace the M$ 2k3 machine)

But thanks again for the responses.
 
  


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
NIC limit in Linux machine vishamr2000 Linux - Security 1 05-21-2005 11:40 AM
How do I logon to my linux machine remotely? NSFrankenstein Linux - Networking 7 09-25-2004 11:09 AM
Limit the amount of login attempts to machine jester_69 Linux - Security 4 10-14-2003 02:35 PM
How to limit telnet access to a specific directory based on logon? Saeven Linux - Networking 3 10-20-2002 05:17 PM
set daily time limit for being logged into machine? JustinHoMi Linux - General 1 10-15-2001 12:58 PM

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

All times are GMT -5. The time now is 12:26 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