Community
    • Login

    Notepad script

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Diyorbek ArslonovD
      Diyorbek Arslonov
      last edited by

      What should I do to create a user using the FOR loop script from U1 to U6

      PeterJonesP madara sanM 2 Replies Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Diyorbek Arslonov
        last edited by PeterJones

        @Diyorbek-Arslonov ,

        Notepad++ does not have a “FOR loop” concept. As a text editor, you could type a FOR loop using the syntax of whatever source code language you are coding in, but this site is about Notepad++, not about generic programming, and as such, your question appears off-topic – if you’ve got a question about “how to code a FOR loop in programming language X”, you need to find a forum about X, not about the tool that you use to type the source code for X.

        If you believe I have misunderstood you, and you think it’s relevant to Notepad++ specifically, instead of being a misplaced question about some programming language that you’re typing using Notepad++, please clarify in such a way as to make it clear why you think this is a problem for fellow Notepad++ users to help you with… but please understand that even with clarification, we may disagree with your assessment. (In general, if your question would be the same whether you are using Notepad++, MS notepad.exe, or copy CON out.txt, then this forum isn’t the right place to ask it.)

        1 Reply Last reply Reply Quote 1
        • madara sanM
          madara san @Diyorbek Arslonov
          last edited by

          @Diyorbek-Arslonov said in Notepad script:

          What should I do to create a user using the FOR loop script from U1 to U6

          Assuming that you are referring to creating user accounts on a Unix/Linux system, here’s an example FOR loop script that you could use to create user accounts from U1 to U6:
          Screenshot 2023-04-21 224841.png

          This script uses a FOR loop to iterate through a range of numbers from 1 to 6, and generates a username and a random password for each user account. The useradd command is used to create the user account with the specified username, home directory, and password. The -m option creates the home directory for the user, and the -s option specifies the default shell. The -p option sets the password for the user, and the openssl passwd command generates an encrypted password hash for the specified password.

          Note that this script should be executed with root privileges, as creating user accounts typically requires administrative privileges.

          Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote -1
          • Alan KilbornA
            Alan Kilborn @madara san
            last edited by

            @madara-san

            So @PeterJones chides @Diyorbek-Arslonov to stay on-topic, and you just blow through that and continue on with something off-topic? Ugh and double ugh.

            1 Reply Last reply Reply Quote 2
            • PeterJonesP PeterJones locked this topic on
            • PeterJonesP
              PeterJones @madara san
              last edited by

              I originally left this unlocked under the minimal chance that somehow the original poster would explain the way in which it was on topic. This didn’t happen, and now this topic is attracting replies to continue perpetuating the off-topic conversation. As such, it is being locked.

              1 Reply Last reply Reply Quote 2
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors