-1

I register standard user from GUI in CentOS 7(Shambala). From vipw file I changed its the users content
sha mbala:x:1001:1001:sha mbala:/home/sha mbala:/bin/bash
and now I'm having trouble with entering in home directory with

cd ~sha mbala

I Also tried

cd ~sha\ mbala

The problem is that I need to enter home directory using ~.

Ojs
  • 924
  • 1
  • 12
  • 26
  • 3
    Spaces in unix username? I belive unix username must match `^[a-z_][a-z0-9_-]+$` – anubhava Apr 12 '16 at 15:06
  • spaces are not allowed in a UNIX user name. That's why I can't follow your problem – hek2mgl Apr 12 '16 at 15:07
  • See some commentary on [serverfault](http://serverfault.com/questions/664868/can-we-create-users-home-directory-with-space-in-name-like-test-123). There are many things that will break with a space in the home directory name. – KevinO Apr 12 '16 at 15:07
  • thats right but I had task about this So changing by hand in `vipw` file works. – Ojs Apr 12 '16 at 15:07
  • Can you please tell me where can I get official naming convention about CentOS? – Ojs Apr 12 '16 at 15:21

1 Answers1

0

A basic gnu/linux username is a 32 character string (useradd(8)). This is a legacy format from the BSD 4.3 standard. passwd(5) adds some additional restrictions like, do not use capital letters, do not use dots, do not end it in dash, it must not include colons.

check more details in this answer What are the real rules for linux usernames on CentOS 6 and RHEL 6?

Community
  • 1
  • 1
vvchik
  • 1,210
  • 1
  • 8
  • 16