useradd doesn't work! why??


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers useradd doesn't work! why??
# 1  
Old 01-27-2010
useradd doesn't work! why??

Code:
[root@localhost root]# uname -a
Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux
[root@localhost root]# useradd 4141421248
useradd: invalid user name '4141421248'


why???
# 2  
Old 01-27-2010
# 3  
Old 01-27-2010
I don't think so.
Because no rule says that.
And one of my friend told me that can work in his system.
# 4  
Old 01-27-2010
Did you read the man page

username

is the user's login name.

The login (login) and role (role) fields accept a string of no more than eight bytes consisting of characters from the set of alphabetic characters, numeric characters, period (.), underscore (_), and hyphen (-). The first character should be alphabetic and the field should contain at least one lower case alphabetic character. A warning message is displayed if these restrictions are not met.

The login and role fields must contain at least one character and must not contain a colon (Smilie or a newline (\n).
# 5  
Old 01-27-2010
Thank you dinjo_jo for your reply.
I tried that in another computer whose OS is RHEL5.2, and that works!
So I am very confused! Maybe it's because of the difference of the OS.
Can you try that in your computer , and let me know if it works?
# 6  
Old 01-27-2010
It can be different on different OS'es and it can be different on same OS if just configured different. So it makes no sense if everybody here in the forum starts trying it out for you.

Maybe your OS has some password checking config files (via pam) like:
Code:
/etc/pam_pwcheck.conf

or
Code:
/etc/pam.d/common-password

Check your OS for similar configs - maybe there is a hint in your man page for useradd too.
# 7  
Old 01-28-2010
useradd works differently on different variants you will need to figure it out on your machine.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Timeout doesn't work, please help me

#!/bin/sh trap "cleanup" TERM timeout=5 mainpid=$$ cleanup() { echo "at $i interupt" kill -9 0 } watchdog() { sleep $1 } (watchdog $timeout && kill -TERM $mainpid) & run_test() (10 Replies)
Discussion started by: yanglei_fage
10 Replies

2. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies

3. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

4. Shell Programming and Scripting

My if statement doesn't work why?

I have the following and for some reason I can't have two options together. I mean if I choose -u and -p it won't work... why? #!/bin/bash resetTime=1 mytotalTime=0 totalHour=0 totalMin=0 averagemem=0 finalaverage=0 times=0 function usage() { cat << EOF USAGE: $0 file EOF } (10 Replies)
Discussion started by: bashily
10 Replies

5. UNIX for Advanced & Expert Users

remsh doesn't work

Hi, I need to use remsh inside a ksh script. The script would remsh to another machine (maybe different OS) and then execute commands. A Simple Script: #!/usr/bin/ksh remsh sun7656 -l myuser "cd /user.3/MyFolder; ls -lart" But this gives me the error: permission denied I also... (4 Replies)
Discussion started by: som.nitk
4 Replies

6. UNIX for Dummies Questions & Answers

FTP doesn't work

Hi! I have 2 servers. The firts has vsftpd server with this configuration: # Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all... (2 Replies)
Discussion started by: Torquemada
2 Replies

7. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

8. Shell Programming and Scripting

sed doesn't work

Hello I' m confused a bit. I want to replace string "&amp" with "&" using this command. sed 's/&amp/&/g' and it doesn't work. Nothing happens. On the other side this works: sed 's/&amp/@/g' or sed 's/&amp/^/g' !!! Can somebody help please? Thanks (3 Replies)
Discussion started by: billy5
3 Replies

9. UNIX for Dummies Questions & Answers

my ctrl+c doesn't work

it seams that my ctrl+c and my ctrl+d don't work. if I type a bunch of jiberish on a line and ctrl+c I expect the command to be cancelled and to be given a fresh prompt, but instead it just putts ^C at the end of the line. Also, ctrl+d should close the session, but instead mine just puts ^D at... (3 Replies)
Discussion started by: yankee428
3 Replies

10. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies
Login or Register to Ask a Question