Galera é o seguinte, fiz um script ao qual quero substituir a sources.list do ubuntu automaticamente, só que toda vez q coloco o script pra executar na hora de usar o echo ele pede a senha do administrador, depois de digitar a senha ele diz q n tem permissão pra executar aquela tarefa. Mas as outras tarefas após isso executam normalmente.
#!/bin/bash
sudo echo "deb http://br.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb http://br.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://br.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner
deb http://ppa.launchpad.net/ailurus/ppa/ubuntu lucid main
deb http://dl.google.com/linux/deb/ stable non-free
deb http://packages.medibuntu.org/ lucid free non-free
deb http://ppa.launchpad.net/openshot.developers/ppa/ubuntu lucid main
deb http://download.skype.com/linux/repos/debian/ stable non-free
deb http://ppa.launchpad.net/tualatrix/ubuntu lucid main
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu lucid main
deb-src http://ppa.launchpad.net/ailurus/ppa/ubuntu lucid main
deb-src http://packages.medibuntu.org/ lucid free non-free
deb-src http://ppa.launchpad.net/openshot.developers/ppa/ubuntu lucid main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu lucid main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu lucid main" > /etc/apt/sources.list
##Chaves GPG da sources.list
sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa
sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo add-apt-repository ppa:mozillateam/thunderbird-stable
sudo add-apt-repository ppa:haliner/ppa
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9A6FE242
wget -q https://dl-ssl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B9BA26FA
gpg --keyserver pgp.mit.edu --recv-keys 0xd66b746e && gpg --export --armor 0xd66b746e | sudo apt-key add -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0624A220
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AF1CDFA9
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
será q terei de usar algum parâmetro para echo ou outro comando no lugar?