LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2007, 07:49 AM   #1
magin
LQ Newbie
 
Registered: Mar 2007
Posts: 12

Rep: Reputation: 0
/etc/passwd


Hi All,

I am a newbie to linux.

I would like to know whether the /etc/passwd file is reffered only at the time of login. What happens if we delete the user entry (by root) after the particular user logs in ? Will that user automatically logout after a specified time as his entry is not present in /etc/passwd.

Thanks in advance.
 
Old 03-30-2007, 07:57 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
/etc/passwd is referenced whenever a password is needed. Deleting a user there could cause difficulties but they won't be forced to logout.

Why do you ask?
 
Old 03-30-2007, 08:27 AM   #3
magin
LQ Newbie
 
Registered: Mar 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for your reply. I asked just because someone told me that linux periodcally checks for validity of the logged in accounts. I tried this RHEL 4 and didnt find any problem like auto logout. I was just check if it do for other flavours.

Thanks
 
Old 03-30-2007, 10:21 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
People cannot login without the existence of a valid /etc/passwd and /etc/shadow and all the rest that supports a user account. Checking the existence of such files would, therefore, be pointless as far as checking the validity of a given login is concerned. Remember, the way to gain access is to pretend to be someone else.

There is no point doing periodic checks either. Linux distributions usually check the validity for a given user logged in to perform certain tasks or to start various processes. After all, an unauthorized user who does nothing is no threat - so why waste the runtime?

(Though it is possibly to set up a cron to ask for password every half-hour or so and logout the user should this test fail... this would be tried in sensitive workplaces where there is concern that users may leave their console without securing it first. There is also autologout with inactivity though.)

So it looks like you have been fed a load of steaming green stuff.

Your security is just as you know:
1. authentication: password (local) or gpg (remote).
2. permissions: you don't get to use stuff what you ain't meant to.
3. context: you don't get to use stuff it ain't meant for.
 
Old 04-03-2007, 08:02 AM   #5
Sunil Kartikey
LQ Newbie
 
Registered: Mar 2007
Location: Pune
Posts: 4

Rep: Reputation: 0
good one Simon!! awesome reply..
 
Old 04-03-2007, 04:45 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Sunil: glad you found it useful.

You will notice that security detail, on more proprietary systems, is normally hidden behind, so called, sensitivity settings. Personally I don't trust any security program with only three options (low, medium, high). Usually, low=insecure and high = unuseable. So everyone uses medium - and nobody knows what any of the settings actually do.

One complaint I have seen though is that linux appears to lack a gui firewall with the behavior of things like zonealarm. This is a simple gui which switches everything off by default, yet reports any attempt at access in either direction that isn't allowed. If it is outgoing, it asks if you want this access (it may be a browser) and so it is very easy to restrict (say) internet access to (say) firefox and exclude all other browsers etc.

It is commonly used as a windows diagnostic tool, since malware trying to phone home will be stopped and it's existence reported.

With linux, we don't need third party tools to check running processes.
 
  


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
Swat uses PAM but changes linux passwd not samba passwd Peter@KKVS Linux - Networking 0 11-26-2006 05:20 AM
what is /etc/passwd- for? xpucto Linux - Security 7 11-22-2006 05:47 PM
passwd romel Linux - Security 1 04-25-2004 02:12 AM
can't passwd leihsun Linux - General 17 06-19-2002 06:37 AM
passwd Winter Linux - Security 2 05-01-2002 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration