LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 04-09-2002, 11:12 PM   #1
karunesh
Member
 
Registered: Jan 2002
Location: India
Distribution: CentOS/Mandriva
Posts: 126

Rep: Reputation: 15
IP & Password Protection


Hi,

I just want to know "Is it possible to restrict a file access on basis of IP in Linux ?.That is can I restrict some IPs not to access particular file and at the same time other can access it.

Another thing I want to know "Is it possible to password protect a file in Linux ?".

Please let me know.

 
Old 04-10-2002, 01:46 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,001
Blog Entries: 54

Rep: Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756
How are you serving these files? Please elaborate.

Btw, there was a thread in one of the other forums here where they mentioned adding the file to a separate passwd'ed group, so ppl have to change to that group to access the file. Under PAM this could prolly have access restrictions by IP as well. Haven't tried it tho.
 
Old 04-10-2002, 04:32 AM   #3
russell
LQ Newbie
 
Registered: Mar 2001
Distribution: *Linux*
Posts: 27

Rep: Reputation: 15
IP & Password Protection

Hi unSpawn and Karunesh,


This is an exciting issue, only if "unSpawn's" guess could prolly be true.

Karunesh must be talking of files on the linux filesystem. I can never imagine that this could be done.

I'm looking forward for more details from unSpawn on how he can use PAM to do this.

Others can come up with suggestions too.

Thanks,
Russell.
 
Old 04-10-2002, 04:44 AM   #4
karunesh
Member
 
Registered: Jan 2002
Location: India
Distribution: CentOS/Mandriva
Posts: 126

Original Poster
Rep: Reputation: 15
Clear the Things

UnSpawn,

Please let me know how the things working through PAM.
And if you have any link which describe all that " Protecting Linux files by IP and Password",then please post it here.

 
Old 04-10-2002, 02:57 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,001
Blog Entries: 54

Rep: Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756
Like I said before this is kinda hearsay, haven't tried it myself, but I guesstimate it'll go like this:
Add group and passwd, add users as member to group, mkdir dir and chown dir to group.
Now users that are member of group can chgrp to it. For using PAM /etc/security/access.conf could provide coverage denying by host, but if you got much users (also dyn. IP's) this will be very cumbersome, better deny by username. There's a PAM module that can read usernames from a file (like ftpusers), maybe add that to the PAM stack when users do chgrp.

Plz read some docu before shooting yourself in one of your own extremities of choice: all about groups (part 4) and the Linux-PAM SAG (part 6).

*And no, I haven't got the thread about this all but I told you it's on this site, so just search, it's not like you gotta wade tru all of the net rite?
 
  


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
Password Protection In CGI amit_28oct Programming 8 06-24-2004 02:22 AM
Directory password protection scootz6 Linux - Security 2 03-25-2004 02:04 PM
apache password protection demicheru Linux - Software 2 02-25-2003 05:13 PM
password protection kushal Linux - Security 4 10-10-2002 09:33 PM
Password Protection TheSockMonster Linux - Newbie 1 05-27-2002 11:10 AM


All times are GMT -5. The time now is 06:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration