Results 1 to 2 of 2
when using the command useradd to create a new user, I want to be able to add to the comment field with the -c option so my question is which ...
- 11-26-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 33
How to use -c option in useradd
when using the command useradd to create a new user, I want to be able to add to the comment field with the -c option so my question is which is the correct way to add a user by the name of T1:
1. useradd -c This is my comment T1
2. useradd -c "This is my comment" T1
3. useradd -c 'This is my comment' T1
4. MyComment = "This is my comment"
useradd -c MyComment Tester
- 11-26-2007 #2Just Joined!
- Join Date
- Nov 2007
- Location
- Camp Pendleton
- Posts
- 55
Hi,
2 and 3 will work. For 4 you need to use something like:
Code:# mycomment="this is my comment" # useradd -c "$mycomment" T1 # finger T1 Login: T1 Name: this is my comment Directory: /home/T1 Shell: /bin/sh Never logged in. No mail. No Plan.


Reply With Quote