can anybody tell me how to create a ubuntu user with having '@'. With help of bellow link I found how to add period in username but haven't found any clue for '@' yet.
Asked
Active
Viewed 171 times
0
1 Answers
2
not sure why you would want to use such character in the user name, but here is one way (for username foo@t):
# useradd -m foo@t
# /bin/su - foo@t
$ id
uid=22284(foo@t) gid=22284(foo@t) groups=22284(foo@t)
then to set a password
# passwd foo@t
to delete such user (and all her/his files):
# userdel -r foo@t

muru
- 197,895
- 55
- 485
- 740

Ante Gabrielssen
- 196
- 1
- 3
-
That backslash is unnecessary - the shell will just translate that to
@
. Tryecho @ \@
– muru Mar 20 '17 at 12:31 -
yes, you are indeed correct, not sure whether it's best to edit original answer or leave it to these comments ... – Ante Gabrielssen Mar 20 '17 at 12:33
@
instead of\.
in the regex. – muru Mar 20 '17 at 12:00