pw error

I´m trying to use the command: [cmd=]pw user add "%u"[/cmd] but returns the error:
Code:
invalid character `%' at position 0 in userid/group name

My shell is csh.
Any ideas?
Thanx in advance
 
What are you trying to do? You cannot use those characters in a username. Or did you mean it as a variable?
 
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
 
Ah. The %u is a placeholder that gets replaced by samba, it's not a 'real' variable. Try without the quotes.
 
Back
Top