# pw error



## gleizer (Nov 26, 2010)

IÂ´m trying to use the command: [cmd=]pw user add "%u"[/cmd] but returns the error: 
	
	



```
invalid character `%' at position 0 in userid/group name
```

My shell is csh.
Any ideas?
Thanx in advance


----------



## SirDice (Nov 26, 2010)

What are you trying to do? You cannot use those characters in a username. Or did you mean it as a variable?


----------



## gleizer (Nov 26, 2010)

Actually,IÂ´m trying to add a user in Samba, the original script use adduser:  `add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u`
but there were many mistakes and IÂ´m trying to use pw.
and yes, *%u* is a variable

Thank you


----------



## SirDice (Nov 26, 2010)

Ah. The %u is a placeholder that gets replaced by samba, it's not a 'real' variable. Try without the quotes.


----------



## gleizer (Nov 26, 2010)

It works now.
Thanks a lot.


----------

