Find the answer to your Linux question:
Results 1 to 8 of 8
Do not put spaces in passwords !...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    0

    Space in a password!!

    Do not put spaces in passwords !

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,977
    You can (in theory), but it isn't recommended. In fact, just about any ascii character (printable or not) should be allowed, except for a new-line which terminates the input for the passwd command.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,303
    Why not?

    As long as you are using a properly salted hash it is just another character and makes it harder to crack a password. NULL (\0) on the other hand would cause problems.

    Legacy systems that pass passwords round in plain text are another matter. But no new systems do that anymore do they?
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  4. #4
    Just Joined! simon's Avatar
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    29
    in some contexts it would be fine, but this doesn't change the fact that as a general rule spaces are not a good idea, because standard input and output treats spaces as significant separators (between commands, parameters, filenames, etc.). in a gui you might be typing something into a nice little dialog box, but behind the scenes a program might then pass it on (to sudo or whatever) via the shell, in which case a space can mess things up. yes, well written scripts (let alone compiled code) usually should be able to cope with spaces, but not all code is well written, and so the fact remains that a string without spaces (e.g. with_underscores_instead) is safer than one with spaces, not just in passwords but even for file names etc.

    of course, if you know how the password's going to be processed, and spaces aren't going to cause problems, then spaces are fine. as elija says, there isn't much software shunting passwords around in plain text these days, and likely to be even less in future. but it's simpler just to avoid spaces: it's a rule you can apply consistently on any system with no unexpected problems.

    as for making it harder to crack a password, i can see how that could be the case for some manual attempts, but in terms of brute force it's just one more character, and even for manual or dictionary-based attacks, i'm not sure how "secret password" is any harder to crack than "secret8password" or whatever. basically if you like spaces, go for it, but i don't think phymonus is wrong to advise avoiding them as a general rule.

  5. #5
    Linux Newbie
    Join Date
    Oct 2008
    Posts
    140
    Complete derailment, how did the OP get to have Zero posts?

  6. #6
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,099
    Quote Originally Posted by kurtdriver View Post
    Complete derailment, how did the OP get to have Zero posts?
    Messages posted in the Coffee Lounge do not count toward a user's total post count.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  7. #7
    Just Joined!
    Join Date
    Mar 2010
    Location
    Michigan
    Posts
    0

    I use spaces...

    I have been using spaces for years. The only time I've had any difficulty was with some websites. In general, I have found that using spaces can make it very difficult to crack passwords.

  8. #8
    Just Joined!
    Join Date
    Feb 2006
    Location
    Cambridge, UK
    Posts
    7
    There's one very good reason not to use spaces in passwords. If you do a character frequency analysis on any chunk of text, spaces are either the most, or nearly the most, single commonest character. And worse, if you use a textual (as opposed to random) password that includes spaces, that means you've got a number of short, easily guessable words. So I'm with Phymonus on this, but probably not for the reasons s/he was expecting.

    If you're going to use words as a basis for passwords, do it in a way that masks them and mixes other characters too. For instance, in an alpha-numeric-only system, you might use c4dAO2g: 'cat' and 'dog' interwoven, with '42' inside the outer characters, and the middle two capitalised. Something that makes sense to you, and is memorable to you, but is not inferrable, predictable or easily broken by a dictionary hack.

    Jon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...