Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of uninitialized value $user, what does this mean? #4

Open
flamecopper opened this issue Oct 8, 2017 · 14 comments
Open

Use of uninitialized value $user, what does this mean? #4

flamecopper opened this issue Oct 8, 2017 · 14 comments

Comments

@flamecopper
Copy link

Use of uninitialized value $users in print at ./enum4linux.pl line 874.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 877.

Use of uninitialized value $users in print at ./enum4linux.pl line 888.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 890.

@batterystaples
Copy link

See pull request #3.

@Cloufish
Copy link

mhmm, I do have the errors too... Even though 3 years have passed...

enum4linux.pl -U 10.10.243.156
Starting enum4linux v0.8.9 ( http://labs.portcullis.co.uk/application/enum4linux/ ) on Thu Dec 10 20:51:24 2020

 ========================== 
|    Target Information    |
 ========================== 
Target ........... 10.10.243.156
RID Range ........ 500-550,1000-1050
Username ......... ''
Password ......... ''
Known Usernames .. administrator, guest, krbtgt, domain admins, root, bin, none


 ===================================================== 
|    Enumerating Workgroup/Domain on 10.10.243.156    |
 ===================================================== 
Can't load /etc/samba/smb.conf - run testparm to debug it
[+] Got domain/workgroup name: TBFC-SMB-01

 ====================================== 
|    Session Check on 10.10.243.156    |
 ====================================== 
[+] Server 10.10.243.156 allows sessions using username '', password ''

 ============================================ 
|    Getting domain SID for 10.10.243.156    |
 ============================================ 
rpcclient: Can't load /etc/samba/smb.conf - run testparm to debug it
[+] Can't determine if host is part of domain or part of a workgroup

 ============================== 
|    Users on 10.10.243.156    |
 ============================== 
Use of uninitialized value $users in print at /home/penelope/PATH/enum4linux.pl line 876.
Use of uninitialized value $users in pattern match (m//) at /home/penelope/PATH/enum4linux.pl line 879.

Use of uninitialized value $users in print at /home/penelope/PATH/enum4linux.pl line 892.
Use of uninitialized value $users in pattern match (m//) at /home/penelope/PATH/enum4linux.pl line 894.
enum4linux complete on Thu Dec 10 20:51:25 2020

@mohzulfikar
Copy link

on the line
rpcclient: Can't load /etc/samba/smb.conf - run testparm to debug it
it tells that there's no conf file on /etc/samba/smb.conf .
I actually bumped on this problem too and managed to solve it by making a plain smb.conf file on /etc/samba
sudo touch /etc/samba/smb.conf.

@Cloufish
Copy link

thanks mohzulfikar!

@mohzulfikar
Copy link

you're welcome, glad it helped @Cloufish

@UnderwaterBaker
Copy link

Im having this same issue, making the smb.conf file didnt work :/

@timb-machine
Copy link
Contributor

@UnderwaterBaker Can you run testparm (https://www.samba.org/samba/docs/current/man-html/testparm.1.html) and share the output?

@skaf24
Copy link

skaf24 commented Jun 21, 2021

Use of uninitialized value $users in print at ./enum4linux.pl line 874.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 877.

Use of uninitialized value $users in print at ./enum4linux.pl line 888.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 890.

I am having this same issue. I tested it on my Kali vm, and tried on my host system(manjaro) and got the same error both times (but on different lines?). I did a testparm on the kali box as @timb-machine requested from another user (I know it was for a slightly different issue but hopefully if helps with the above errors). These are the results from mine. (Removed some line breaks so it posts nicer):

Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = Enter\snew\s\spassword:* %n\n Retype\snew\s\spassword:* %n\n password\supdated\ssuccessfully .
passwd program = /usr/bin/passwd %u
server role = standalone server
unix password sync = Yes
usershare allow guests = Yes
idmap config * : backend = tdb
[homes]
browseable = No
comment = Home Directories
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

@johnfromoptus
Copy link

johnfromoptus commented Sep 30, 2021

I ran testparm and the output noted that my netbios name was identical to my workgroup name. It also showed that cluster mode was on and the enum output said it needed root to run in cluster mode. I changed the netbios name to something different and disabled cluster mode in smb.conf and my issue was resolved.

@m1ndcr4ck
Copy link

m1ndcr4ck commented Mar 23, 2022

Running last version and seeing the error on users still happening, any update about it?

Thanks in advance

 enum4linux -U 192.168.129.13                                                                      
Starting enum4linux v0.9.1 ( http://labs.portcullis.co.uk/application/enum4linux/ ) on Wed Mar 23 09:28:26 2022

 =========================================( Target Information )=========================================

Target ........... 192.168.129.13
RID Range ........ 500-550,1000-1050
Username ......... ''
Password ......... ''
Known Usernames .. administrator, guest, krbtgt, domain admins, root, bin, none


 ===========================( Enumerating Workgroup/Domain on 192.168.129.13 )===========================


[+] Got domain/workgroup name: WORKGROUP


 ==================================( Session Check on 192.168.129.13 )==================================


[+] Server 192.168.129.13 allows sessions using username '', password ''


 ===============================( Getting domain SID for 192.168.129.13 )===============================

Domain Name: WORKGROUP
Domain Sid: (NULL SID)

[+] Can't determine if host is part of domain or part of a workgroup


 ======================================( Users on 192.168.129.13 )======================================

Use of uninitialized value $users in print at ./enum4linux.pl line 972.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 975.

Use of uninitialized value $users in print at ./enum4linux.pl line 986.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 988.
enum4linux complete on Wed Mar 23 09:28:40 2022

@RaxoCoding
Copy link

same here still getting errors with -U

@AnotherShen
Copy link
Contributor

AnotherShen commented Jul 2, 2022

Uninitialized value $users occurs when the rpcclient command does not receive anything in response. I've added a pull request to handle it but they can be safely ignored. It just means the command failed to find anything.

The RID cycling can definitely be made more efficient/faster as well but maybe another time. Currently it just misses the important Unix UIDs and searches across known Windows SIDs.

@john5652
Copy link

john5652 commented Aug 2, 2022

Hi I am also having this issue, however when using the -a option for ALL it does return users. So I do not think the lack of return is the issue.

@Xhoenix
Copy link
Contributor

Xhoenix commented Dec 26, 2022

I've created a PR #23 fixing this issue. You can check the latest code here.

Damn, this issue is 5 years old. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests