In This line , if I understood correctly you are trying to append $oldline and $username both to smb.conf

echo $oldline && echo $username  >> /etc/samba/smb.conf

however, it will only append $username to smb.conf, you probably want to make it in two lines ,
eg.


echo $oldline >> /etc/samba/smb.conf
echo $username  >> /etc/samba/smb.conf

or if you want them on the same line, you would have to combine the variables and echo new variable into the smb.conf

newline=${oldline}${username}
echo $newline >> /etc/samba/smb.conf


Thank you

Amit K Nepal
Infrastructure Engineer (RHCE, CCENT, C|EH, C|HFI)
omNovia Technologies Inc.
Amit K Nepal
On 7/25/2013 11:46 AM, Lisa Kachold wrote:
echo $oldline && echo $username  >> /etc/samba/smb.conf