Solved

useradd command

Posted on 2006-11-30
6
978 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole and browser performance 1 63
Linux hostname change 2 55
Video Streaming 6 56
linux redhat 7.2 10 43
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now