Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-18-2007, 07:31 PM
|
#1
|
LQ Newbie
Registered: Jun 2007
Posts: 4
Rep:
|
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
|
|
|
07-18-2007, 08:11 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
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...
|
|
|
07-18-2007, 08:44 PM
|
#3
|
LQ Newbie
Registered: Jun 2007
Posts: 4
Original Poster
Rep:
|
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
|
|
|
07-18-2007, 09:02 PM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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.
|
|
|
07-19-2007, 11:26 AM
|
#5
|
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824
|
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.
|
|
|
07-22-2007, 04:22 AM
|
#6
|
Member
Registered: Jun 2003
Location: UK
Distribution: Devuan Beowulf
Posts: 514
Rep:
|
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.
|
|
|
07-22-2007, 09:18 AM
|
#7
|
Member
Registered: Nov 2004
Location: Horseheads, New York
Distribution: Mandriva 2010.1 / KDE 4.5.2, Slax, Knoppix, Backtrack & etc...
Posts: 198
Rep:
|
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
|
|
|
07-23-2007, 06:09 AM
|
#8
|
Member
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938
Rep:
|
... 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!
|
|
|
07-23-2007, 06:10 AM
|
#9
|
Member
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938
Rep:
|
And now to unhijack the thread:
tkubaska, did you get all the info you needed?
|
|
|
07-23-2007, 02:46 PM
|
#10
|
Member
Registered: Dec 2006
Distribution: Slackware 11
Posts: 144
Rep:
|
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.
|
|
|
07-23-2007, 03:38 PM
|
#11
|
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824
|
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.
|
|
|
All times are GMT -5. The time now is 12:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|