1828581 Members
2279 Online
109982 Solutions
New Discussion

Linux useradd

 
SOLVED
Go to solution
Cliff Lim Kok Hwee
Regular Advisor

Linux useradd

Hi Forum,

I will need to add user using the useradd command having the following user particulars which I intend to have it inside the comment field.

username=rajesh
groupname=hpms_admins
User Particulars
Employee id=123456
Employee DID=61234

#useradd -g hpms_admins -m -d /home/rajesh rajesh -c 123456 61234

Query: Is the comment field syntac correct?
3 REPLIES 3
Claudio Cilloni
Honored Contributor
Solution

Re: Linux useradd

I think you should include the comment field in double quotes ("").

#useradd -g hpms_admins -m -d /home/rajesh rajesh -c "123456 61234"

ciao
Claudio
Cliff Lim Kok Hwee
Regular Advisor

Re: Linux useradd

Hi,

Was thinking of that as per HP-UX.

Thanks/cliff
Gopi Sekar
Honored Contributor

Re: Linux useradd


correct syntax would be:

useradd -g hpms_admins -m -d /home/rajesh rajesh -c "123456 61234"

alternatively u can use LDAP if you are adventerous enough :)

Hope this helps,
Gopi
Never Never Never Giveup