LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-19-2007, 10:04 PM   #1
sobia
LQ Newbie
 
Registered: Oct 2005
Posts: 8

Rep: Reputation: 0
/etc/passwd File Problem


Hello,

I am new to linux and I want to ask that If I put !! (double exclamation mark) in password column in /etc/passwd file then what will happen and I leave it blank then what will be the output?

Thanks
 
Old 02-19-2007, 11:20 PM   #2
baltho
Member
 
Registered: Aug 2004
Location: Adelaide, South Australia
Distribution: Ubuntu (Natty)
Posts: 38

Rep: Reputation: 18
From memory, Linux doesn't use the password in /etc/passwd any more - the file has to be readable by everyone for various reasons so the password (md5 hash of it, actually) is stored in /etc/shadow, which is only readable by root. So changing the password field in /etc/passwd should do nothing.
 
Old 02-20-2007, 01:11 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Here is an entry from my passwd file:
mherring:x:1000:100:mherring:/home/mherring:/bin/bash

When you say "password field", do you mean the "x"?

Regardless of the actual password (in shadow), deleting the "x" will allow user mherring to log in with no password.

What is the !! supposed to do??
 
Old 02-20-2007, 04:04 AM   #4
johngreenwood
Member
 
Registered: Nov 2006
Location: Lancashire, United Kingdom
Distribution: Slackware 13
Posts: 243

Rep: Reputation: 31
I think I read somewhere that putting an exclamation mark in front of the hash will disable the account. Due to the fact that the stored hash and the hash from the entered password will not match. So I guess it would work with any character, not just exclamation marks. Where did I read that? I don't know.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to mirror the file passwd? xpucto Linux - Newbie 2 02-02-2006 08:02 AM
question about /etc/passwd file hongxing Linux - Software 2 11-30-2005 10:47 AM
Where can i find the passwd file? alice95089 Linux - Software 3 04-06-2005 10:01 PM
passwd file within a jailed env f1uke Linux - Security 1 12-18-2003 10:37 AM
/etc/passwd file wedgeworth Linux - Software 1 10-09-2003 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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