1838622 Members
2100 Online
110128 Solutions
New Discussion

user adds

 
SOLVED
Go to solution
derek b smith_1
Regular Advisor

user adds

Has anyone ever added a user with numbers first as in 109das? I tried and I get invalid login in name.
Here is my command

useradd -u 14480 -g 300 -m -d /home/109das -s /usr/bin/ksh
-c "derek smith" 109das

Is this possible?

thanks, derek
6 REPLIES 6
Thierry Poels_1
Honored Contributor
Solution

Re: user adds

hi,

sorry not supported: see "man 4 passwd" :

"The login name must begin with an alpha character and may only contain alphanumeric and underscore characters."

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
derek b smith_1
Regular Advisor

Re: user adds

ok thanks! But, is there a way for new useradds to force the initial passwd to be a valid password, such as ohio123?

Mel Burslan
Honored Contributor

Re: user adds

useradd command has nothing to do with a password generation. Whne the user is added using useradd, it is disabled by default. System admin needs to assign this user a new password via passwd command to make it active/enabled
________________________________
UNIX because I majored in cryptology...
Sridhar Bhaskarla
Honored Contributor

Re: user adds

Hi,

Yes. First you will need to get the encrypted strings for this password which can be done either by using "/usr/lib/makekey" or setting it to an existing user and grabbing the encrypted password from either /etc/passwd or /tcb directory on a trusted system. With makekey you have to supply *exactly* 10 chars with first 8 being the password and the last two any arbitrary chars of you choice. For ex.,
"echo Ohio2004xy|/usr/lib/makekey" Once you got the encrypted password, then use

/usr/sam/lbin/usermod.sam -p encrypted_string login_name

It will set the password.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Bharat Katkar
Honored Contributor

Re: user adds

Try creating user through SAM and choose "normal behaviour" for set password Options and then assign password to that User immediately (if you want you can set it to ohio123.

Hope this is what you are expecting.
Regards,
You need to know a lot to actually know how little you know
derek b smith_1
Regular Advisor

Re: user adds

so for
echo Ohio2004xy|/usr/lib/makekey" Once you got the encrypted password, then use

/usr/sam/lbin/usermod.sam -p encrypted_string login_name

this would be
/usr/sam/lbin/usermode.sam -p encryted_pword user id?

I have xyFPl71Wsg3cA as the encrypted passwd and this did not work when I went to login as my test account