1

I have Debian Stretch and my user name is two strings like "jkl mno" and I when I press Alt+Ctrl+F3 command line appears and gui disappears and I can't log in with my credentials, so I created another account with single string like "avc" and when I supply its password and user ID it logs in. How can I fix the problem of not bing able to log in with user ID of two strings. (there is a space in one word jkl and the other mno).

I can easily log in with GUI however.

1 Answer 1

4

User names aren’t supposed to contain the space character; POSIX recommends only using characters from the portable filename character set, which contains all unaccented US English alphanumerics, period, underscore, and hyphen. Additional allowable characters which aren’t part of the portable filename character set are the at-sign (‘@’) and the dollar symbol (‘$’, for compability with Samba).

It’s not surprising that you can’t log in using “jkl mno”. You should switch to a user name without a space character (you can do this by editing /etc/passwd, /etc/shadow, and /etc/group).

Note that on Debian and derivatives, the user creation tool, adduser, enforces these restrictions by default.

4
  • Thank you Stephen King, I misspoke earlier, it was not my user name which had two strings, my ID as I do "whoami" is one string, however, the name which I see in GUI mode when I start the Linux is two string, that is my full name. However, I created another account with adduser and the name is just one string and it works fine. I don't know what to edit in /etc/shadow or /etc/group as with name (single string username) there is a long string of Lord knows what meaning. Commented Nov 2, 2017 at 1:54
  • @Jawad then you shouldn’t have any problems; you need to use your short id to log in, that’s all. Full names can contain spaces. Commented Nov 2, 2017 at 8:25
  • Actually I can do that, thank you @Stephen King, using the one word userID/user name however I wanted to login with my first ID as well. Is there a way to change/reset my userID, which has two words in it, without loosing functionality of other programs/software as I may not be able to login to a database managed software like Oracle. In fact I would like all easy methods, just warn me if a method will cast me to lose functionality of other programs. Thank you Commented Nov 9, 2017 at 9:57
  • 1
    Your two comments here contradict each other. Does your id contain a space, or doesn’t it? Commented Nov 9, 2017 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .