?
Solved

useradd command

Posted on 2006-11-30
6
Medium Priority
?
983 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Accepted Solution

by:
bryanlloydharris earned 336 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 332 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 332 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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

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 …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month9 days, 20 hours left to enroll

762 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