Operating System - HP-UX
1833007 Members
3313 Online
110048 Solutions
New Discussion

useradd in format of firstname.lastname

 
derek b smith_1
Regular Advisor

useradd in format of firstname.lastname

Does HPUX 11.0, 11.11 and 11.23 allow users to be added in the format of first.last?
If not is there another way to make this happen?


$ useradd joe.smith
7 REPLIES 7
BW Moll
Advisor

Re: useradd in format of firstname.lastname

Use SAM and you can add user names in any format you wish.
James R. Ferguson
Acclaimed Contributor

Re: useradd in format of firstname.lastname

Hi Derek:

If you mean:

# useradd -u 3000 -c "First.Last" someuser

However, you cannot create a login name like "some.user". The login name must begin with an alpha character and may only contain alphanumeric and underscore characters.

Regards!

...JRF...
Paul Sperry
Honored Contributor

Re: useradd in format of firstname.lastname

I believe they are all still limited to 8 characters.

see this post

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=110703
derek b smith_1
Regular Advisor

Re: useradd in format of firstname.lastname

no I mean
$useradd firstname.lastname
but through sam it did not work on 11.11.
However I did this to get around it.

$useradd test
$vi /etc/passwd
changed line from test to test.tes.
login did work however cant get around 8 char limit.

thank you!
derek
derek b smith_1
Regular Advisor

Re: useradd in format of firstname.lastname

no I mean
$useradd firstname.lastname
but through sam it did not work on 11.11.
However I did this to get around it.

$useradd test
$vi /etc/passwd
changed line from test to test.tes
login did work however cant get around 8 char limit.

thank you!
derek
OldSchool
Honored Contributor

Re: useradd in format of firstname.lastname

from "man useradd"

"The useradd command may be used with the login argument, where login is the new login name, specified as a string of printable characters. It may not contain a colon (:) or a newline (\n)."

the problem isn't the ".", that works fine. (I've a bunch of users with x.y logins). the issue is that sam and useradd limit the login id to 8 characters...which is the standard

Re: useradd in format of firstname.lastname

Actually in 11.23 and 11.31 you can go beyond 8 characters for your user names. See the lugadmin command (example here for 11.23):

http://docs.hp.com/en/B3921-60631/lugadmin.1M.html

Pay careful attention to the warnings section - not all applications or commands will work as expected with long user names, so make sure to do plenty of testing...

HTH

Duncan

I am an HPE Employee
Accept or Kudo