1
I want to create a system that should interactively find the user and then say whether it exists or not. I must provide the username and if the user is found then the system has found the username and enters, if it does not say that there was an error
I need to do something like that (in pseudo-code):
erro<-"O utilizador nao foi encontrado"
escreve ("Introduza nome de utilizador")
lê nome
se (nome==encontrado)
{
... entra no sistema
}
senao
{
escreve ($erro)
}
in Bash on Linux Ubuntu:
#!/bin/bash
erro="Utilizador não encontrado"
echo "Qual o utilizador que pretende encontrar?"
read user
if[user (encontrado)]#duvida
{
....
}
else
{
echo $erro
}
fi
Where will be the "database" of users? You intend to use the /etc/passwd and validate whether the user/users exists inside or will have another user base?
– alacerda