net user fails on 21H2

Page 2 of 2 FirstFirst 12

  1. Posts : 776
    Windows 7
       #11

    I haven't heard any stories about Windows excluding new accounts from Users group.

    You keep referring to "the customer", is there an unattended.xml or other Windows install scripts you're forgetting to share? Right now, I don't see how a vanilla ISO image is causing this.
      My Computer


  2. Posts : 425
    Windows 10
    Thread Starter
       #12

    garlin said:
    I haven't heard any stories about Windows excluding new accounts from Users group.

    You keep referring to "the customer", is there an unattended.xml or other Windows install scripts you're forgetting to share? Right now, I don't see how a vanilla ISO image is causing this.
    Yes, no.
    I shared the code in an earlier post...
      My Computer


  3. Posts : 776
    Windows 7
       #13

    To recap, you've created Tanya through OOBE as the primary user? And didn't do anything to remove Tanya from the default Users group, or change her rights?
      My Computer


  4. Posts : 425
    Windows 10
    Thread Starter
       #14

    garlin said:
    To recap, you've created Tanya through OOBE as the primary user? And didn't do anything to remove Tanya from the default Users group, or change her rights?
    You understand that correctly. I checked all PCs and they are exactly the same. All are created using the same image, so I would expect to see the same thing on all PCs

    Anyway, to the original post; I was going to post some images showing it being a vanilla image, but i found the cause, sort of.

    I rebooted twice. Then tried to net user add and it works fine. What I was doing was installing drivers on the raw windows install, then booting to a macrium recovery disk and creating a backup image of the drive, and rebooting and running my script.

    I added an extra reboot... Drivers, reboot, macrium.. Reboot, reboot, script... works.

    I suspect there is a pending <something> getting in the way (Perhaps a pending registry entry, or pending.xml or something else. I haven't spent time on tracking that down. Two reboots gets me out of trouble.

    It only does it on the 21H2 image. My 1809 image doesn't need the extra reboot.

    As to the OOBE issue? Who knows. I can "net localgroup users tanya /add" to fix that
      My Computer


  5. Posts : 425
    Windows 10
    Thread Starter
       #15

    @garlin An update

    I tried with autounattend.xml. Account gets added to local users group no problems.
    Without using autounattend.xml the account is not added to the local users group.
    This is on 21H2. It clearly a Windows issue.

    I see that you are using 22H2, so if your primary account, created when installing Windows from scratch is added to the group then the bug seems to have been fixed in either 22H1 or 22H2.

    I'm not going to upgrade past 21H2 just to fix this. I'll just add it as a known bug in this Windows version.
      My Computer


  6. Posts : 776
    Windows 7
       #16

    When you're not using autounattend, is the primary user a local account, or a MS account? Some users do the bypass tricks to avoid signing up for a MS account.
      My Computer


  7. Posts : 425
    Windows 10
    Thread Starter
       #17

    garlin said:
    When you're not using autounattend, is the primary user a local account, or a MS account? Some users do the bypass tricks to avoid signing up for a MS account.
    Up to 22H1 and WIndows 11 the "bypass tricks" are just disconnecting the network cable before starting the install.
    I've been doing that since the days of Windows 7.

    Apart from the initial telemetry dumps Windows installs a bunch of drivers I don;t want. Eg I use a razor mouse but I don't use the Synapse software. I can disable "include drivers with windows updates", which I do - later - and I don't want updates installing when I building a PC.

    The day there is no way around MS Accounts is the day I go full time Linux on all PCs.
    I use only local accounts.
      My Computer


  8. Posts : 776
    Windows 7
       #18

    I installed 20H2, 21H2 & 22H2 Home and created OOBE local accounts. The primary user in all cases doesn't end up in the BUILTIN\Users group. As you noted, the difference is the autounattend file.

    Regardless, 22H2 Home appears to work normally.
    Code:
    C:\Users\GARLIN>net user garlin
    User name                    GARLIN
    Full Name
    Comment
    User's comment
    Country/region code          000 (System Default)
    Account active               Yes
    Account expires              Never
    
    Password last set            1/18/2023 12:09:29 AM
    Password expires             Never
    Password changeable          1/18/2023 12:09:29 AM
    Password required            No
    User may change password     Yes
    
    Workstations allowed         All
    Logon script
    User profile
    Home directory
    Last logon                   1/18/2023 12:03:37 AM
    
    Logon hours allowed          All
    
    Local Group Memberships      *Administrators
    Global Group memberships     *None
    The command completed successfully.
    C:\Users\GARLIN>
    Code:
    C:\Windows\system32>net user Jane xyz123 /ADD /passwordchg:no /expires:never /active:yes /fullname:"Jane Doe"
    The command completed successfully.
    
    
    C:\Windows\system32>net user jane
    User name                    Jane
    Full Name                    Jane Doe
    Comment
    User's comment
    Country/region code          000 (System Default)
    Account active               Yes
    Account expires              Never
    
    Password last set            1/18/2023 12:06:26 AM
    Password expires             3/1/2023 12:06:26 AM
    Password changeable          1/18/2023 12:06:26 AM
    Password required            Yes
    User may change password     No
    
    Workstations allowed         All
    Logon script
    User profile
    Home directory
    Last logon                   Never
    
    Logon hours allowed          All
    
    Local Group Memberships      *Users
    Global Group memberships     *None
    I don't use Macrium, so maybe that's the difference. Are you creating new accounts before backing up?
      My Computer


  9. Posts : 425
    Windows 10
    Thread Starter
       #19

    Thanks for verifying my findings.

    I dont think Macrium is the cause. This appears to be a Windows issue.

    I boot from a thumb drive to create the image. At that point there is nothing but Windows and drivers installed.
    The image is a recovery point for when I run my application install script. If the script breaks I can go back to the clean image.

    I haven't spent near enough time with the autounattend.xml file. Maybe it's time get intimately familiar with it, although I have 20 PCs over two sites to maintain and it appears variables cannot be used so things like device name and user name can't be automated. It looks like I'd have to write an answer file for each PC.

    The reason the net user /add command was failing was due to a pending device name change that occurs after the first reboot, which is why the second reboot resolved it. I know, it makes no sense to me either.

    I now rename the PC as the first thing I do, even before intalling INF and other drivers, and make sure I reboot straight away. As installing INF, NVMe and audio drivers all want a reboot by the time i run my script there have been several reboots and it then works fine.

    Thanks for your assistance. Glad that the cause has been discovered. Now that you noted they are not being added to the local users group I can automate that, and identifying the pending operation means we're all good.

    Now my next challenge... A 1 second audio delay on PCs that use nvidia HD Audio over HDMI to Yamaha receivers.... Isn't Windows so much fun :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:33.
Find Us




Windows 10 Forums