Solved

useradd command

Posted on 2006-11-30
6
980 Views
Last Modified: 2013-12-16
We have linux machine as a mail server.. and we are using windows XP as a client machine..(Outlook express)
i want to create a new user..with hyphen like "abc_d"
so that we can use this id as                     abc_d@domain.com

please advise me what is command to create the id..

i am using some other id like with out any hyphens.. it is ok.. but i want to create user with having hyphens..

this is command what iam using with out hyphens.. user id  "abc"

# useradd -c "staff" -u 123 -g 500 -m abc -d /home/abc -s /bin/bash

but i want to create the user with "abc_d"



0
Comment
Question by:expertblr
6 Comments
 
LVL 3

Accepted Solution

by:
bryanlloydharris earned 84 total points
ID: 18047838
What about the adduser command?  Just type adduser by itself and see if you have it.  If you have it, just answer the questions and it will add your user.
0
 
LVL 43

Assisted Solution

by:ravenpl
ravenpl earned 83 total points
ID: 18052260
I'm sorry - I don;t understand Your problem.
Just use the username "abc_d". Hint: don't use -u option.
bryanlloydharris: what brand of Linux You use - mine useradd is not asking for anything?
0
 
LVL 3

Assisted Solution

by:windbringer
windbringer earned 83 total points
ID: 18065061
The question is a little bit intriguing for me.
First for me hyphen is something like this - not like this _ so the user would be abc-d not abc_d.
Second it would help  if you tell the problem with useradd command. Meanining what command did  you give and what error did you get.
Anyway it is good to check if that user id you want to create exists (the user-id is from the -u option and you can check it looking at the /etc/passwd and /etc/shadow files).  And if the username is not accepted you can try using single quote around the username which prevents that the username to be interpreted as an option.
ravenpl: I use Slackware and there adduser it is a script which asks you different options you want for the user.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question