Score:0

How to build a script to check the smbclient login from a list of users

za flag

I have a list of users which i want t test if they have login enable anonymously for ex:

user list ( user.txt)

CascGuest
arksvc
s.smith

I am trying to issue these command ( no password)

smbclient -L \\10.10.10.182\\ -U arksvc%password                                                                                                                            
smbclient -L \\10.10.10.182\\ -U CascGuest%password

How can i automate this. using some script to read the username from file and try the command

smbclient -L \\10.10.10.182\\ -U usernamefromlist%password 
hr flag
You could use a *while loop*, with a structure similar to this: [How can I read URLs on separate lines in a .txt file and ping each one](https://askubuntu.com/a/975408/178692)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.