1753877 Members
7562 Online
108809 Solutions
New Discussion юеВ

Script to add user

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

Script to add user

Hi,

What is the variable name for Office Location & Office Phone in SAM during new user creation

During user creation, we are using a script which is a.sh

Now I would like to add in Office Location & Office Phone. I know the variable name "$comment" in this script is allow me to add in the info for Real Name.

So, how to add in the Office Location & Office Phone by using this script?
4 REPLIES 4
Simon Hargrave
Honored Contributor
Solution

Re: Script to add user

This is all stored in the "comment" field, separated with commas. The format is: -

full name, office location, extension, phone.

So instead of -c "Fred Bloggs", you can put -c "Fred Bloggs, First Floor, 1234, 01234567890"
Simon Hargrave
Honored Contributor

Re: Script to add user

For more detail, see description of the "gecos" field in "man 4 passwd"
Franky_1
Respected Contributor

Re: Script to add user

Hi,

all the comments you wanna store can be placed under the -c (comment) option

eg

Name, Building, Floor, Phone etc.

Regards

Franky
Don't worry be happy
RAC_1
Honored Contributor

Re: Script to add user

You need to look at option -c. (the comment for user) Also you may want to look at command "chfn" This appilies to finger command.

Anil
There is no substitute to HARDWORK