Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- filename="zad.txt"
- for line in $(cat zad.txt)
- do
- fn=`echo "$line"|cut -d: -f1`
- ln=`echo "$line"|cut -d: -f2`
- echo "$fn"
- echo "$ln"
- done
- #!/bin/bash
- echo "Ilu uzytkownikow mam utworzyc?"
- read uCount
- echo "Utworzymy :"
- echo $uCount
- counter=1
- while [ $counter -le $uCount ]
- do
- echo "Wprowadz $counter nazwe:"
- read username
- echo "Wprowadz $counter haslo:"
- read password
- useradd -m -p $(openssl passwd -1 ${password}) -s /bin/bash ${username}
- echo "Utworzono $username : $password"
- ((counter++))
- echo "$username:$password" >> zad2.txt
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement