LinuxQuestions.org
Review your favorite Linux distribution.
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 07-18-2007, 07:31 PM   #1
tkubaska
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Rep: Reputation: 0
what does !! mean in /etc/passwd?


I'm reading some instructions on setting up a user. The user will be called apache (no surprise, it's a web user) but the sample line for /etc/passwd is confusing to me. I don't know what the !! means. I'm used to seeing an x there.

The /etc/passwd line is
apache:!!:48:48:Apache:/home/www-data:/bin/bash

Later this user will be put in a group called www that will get user specifics in /etc/sudoers so that one can
sudo -u apache bash without a password.

There's not much descriptive text that goes along with these directions and I'm having difficulty figuring out what's going on. Can anyone help? ... at least about the !!.

I can't tell what distro the directions are referring to, but it's not Ubuntu, might be Suse or RedHat or Fedora.

Thanks.
-ted
 
Old 07-18-2007, 08:11 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
IIRC that means the account has its password disabled - like when you run usermod -L <username>. According to the man page for usermod, it uses a single '!' symbol though...
 
Old 07-18-2007, 08:44 PM   #3
tkubaska
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Original Poster
Rep: Reputation: 0
what does !! mean in /etc/passwd?

Thanks. I just looked at the usermod man page and this could be what is meant.

Seems to me though that putting an x in the passwd field and then a * in the passwd field of the corresponding shadow entry would do the same thing ... that is, make it a non-login account.
-ted
 
Old 07-18-2007, 09:02 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
If that field is blank, it means that the user can sign in with no password. There is also a setting (I think) that stops the user from logging in at all.
 
Old 07-19-2007, 11:26 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
You mention Ubuntu -- are you running it? If not, what distro are you running?

Regardless, you don't have to go through the manual steps of adding a user, and you very likely don't have to go through the process of compiling apache yourself (unless you want to).

Take a look at the "useradd" command and at the "adduser" command. "adduser" is probably the more advanced one and the one you should use. It will take care of everything, so you don't have to manually edit /etc/passwd (and as you can see by reading the man page, you can tell it to set the home dir to something non-default, and to have a disabled login, etc). Then, take a look at how to install a program through your distribution's package manager (On Ubuntu, Synaptic in a GUI or aptitude/apt-get on the command line).

Last edited by AlucardZero; 07-19-2007 at 11:27 AM.
 
Old 07-22-2007, 04:22 AM   #6
v00d00101
Member
 
Registered: Jun 2003
Location: UK
Distribution: Devuan Beowulf
Posts: 514
Blog Entries: 1

Rep: Reputation: 37
Unless the point for the OP was to learn how to do things manually in case useradd/adduser ceased to function and he had to redo it by hand.
 
Old 07-22-2007, 09:18 AM   #7
catworld
Member
 
Registered: Nov 2004
Location: Horseheads, New York
Distribution: Mandriva 2010.1 / KDE 4.5.2, Slax, Knoppix, Backtrack & etc...
Posts: 198

Rep: Reputation: 36
No help here, just saw your sig line, Pixellany. I raise my hand! I STILL have a vacuum tube collection, I rebuild tube type amplifiers and short wave radios. Indeed, the smell of acid core flux wafts the halls over here.

Tubes are where it's at, so far as sound reproduction. Even order distortion, i.e. warm and true. ALL solid state introduces harsh, odd-order distortion, regardless of how good it is. These well trained ears can always tell the difference.

Tried to send this via PM but apparently don't have permissions... sorry for the wasted space, just really enjoyed seeing your signature, all of it!

"hello, my name is Bob and I'm a windows user... but thank God I've been on the wagon for 9 years now!" (applause, 'atta boy Bob!' heard in the audience)

Nothing but Linux in my environment. Got Slax?

cat
 
Old 07-23-2007, 06:09 AM   #8
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
... and I raise my hand WRT the IBM keypunch. The 026 was much noisier than the 029, and had no lower case. If you made a mistake, you punched a new card. Cards were 1000 to the dollar.

Later models had an electronic display of the card's intended content, which prevented many wasted cards.

Those were the days.

Boy, talk about hijacking a thread!
 
Old 07-23-2007, 06:10 AM   #9
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
And now to unhijack the thread:

tkubaska, did you get all the info you needed?
 
Old 07-23-2007, 02:46 PM   #10
jeenam
Member
 
Registered: Dec 2006
Distribution: Slackware 11
Posts: 144

Rep: Reputation: 15
Sorry to hijack but private messages and email won't work...

Catworld, please contact me when you get a chance. My AOL IM screen name is 'Mint21'. It's about tubed audio gear. Thanks.

OK back to the thread...

I've never seen '!!' in the pw field of an /etc/passwd file. Might want to run rootkit hunter on that box.
 
Old 07-23-2007, 03:38 PM   #11
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
A little Googling reveals that on RedHat(-derived) systems put !! in as the the hash, when an account is created, until a password has been entered.
 
  


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 04:20 AM
/etc/passwd XaViaR Linux - General 1 06-13-2005 10:12 AM
passwd romel Linux - Security 1 04-25-2004 01:12 AM
can't passwd leihsun Linux - General 17 06-19-2002 05:37 AM
passwd Winter Linux - Security 2 05-01-2002 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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