Question

Create a universal user login script (both Windows and Linux) that checks for group membership and...

Create a universal user login script (both Windows and Linux) that checks for group membership and maps a drive letter to the appropriate user group folder created during the File and Folder Permissions Lab.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Map Network Drive Methods


In common with other scripting languages, VBScript
uses three components an object, a method, and a
value. Most of my scripts create objects using names
beginning with obj, for example objNetwork. What
gives any scripting language power is the rich variety
of methods or verbs. Here is a list of examples of map
network drive methods.

« MapNetworkDrive

« RemoveNetworkDrive

« EnumNetworkDrives


NTM will produce a neat diagram of your network
topology. But that’s just the start; Network Topology
Mapper can create an inventory of the hardware and
software of your machines and network devices. Other
neat features include dynamic update for when you
add new devices to your network. | also love the ability
to export the diagrams to Microsoft Visio.
Finally, Guy bets that if you test drive the Network
Topology Mapper then you will find a device on your
network that you had forgotten about, or someone
else installed without you realizing!
Download your 14 day free trial ofSolarWinds Network
Topology Mapper
Example — MapNetworkDrive
The purpose of this VBScript is to map the H: toa
share called ‘\nome’ In my example the server is called
‘\\alan’.

Pre-requisites

1. On Line 2 change the name of the server from ‘\\alan’
to the name of your server. You need a computer with
a network share.

2. Make sure that the shared folder is called ‘\home’
Alternatively, alter the word ‘\nome’ in the script if
your share is called something else.

Instructions to MapNetworkDrive

1. Copy and paste the script below into notepad or get a
script editor such as OnScript .

2. Change the server name from "\\alan to the name of
your server.

3. Check the share name ‘\home’.

4. Save the file with a .vbs extension, e.g. MND.vbs or
MapNetworkDrive.vbs.

5. Double click the resulting script and look in your
Windows Explorer for a new drive letter called : home
on ‘alan’ (H:)

Set objNetwork = WScript.CreateObject("WScript.Network’) objNetwork.MapNetworkDrive "H:” , "\\alan\home"

Learning Points

Note 1: If you run the script a second time, then you

get WSH error message code 80070055. The solution

is launch Windows Explorer, just right-click on: home

on ‘alan’ (H:) and select: Disconnect.

Note 2: | cut this script down to the bare minimum to

map a network drive.

Add a comment
Know the answer?
Add Answer to:
Create a universal user login script (both Windows and Linux) that checks for group membership and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a Windows batch script. The batch script will contain the following: Ask the user interactively:...

    Create a Windows batch script. The batch script will contain the following: Ask the user interactively: Boot drive letter of the computer Computer name Computer Model Check to see if the boot drive in #1 exists with the folder newfolder (#1 above) If yes cd BootDrive\newfolder If no, make the directory BootDrive\newfolder Check to see if casefile.txt exists: If yes goto the label DONE Tell the user that data already exists in the newfolder folder and exit the program Output...

  • Problem 1 Write a BASH script to create a user account from the Linux system on...

    Problem 1 Write a BASH script to create a user account from the Linux system on which your script is run. The script should process two positional parameters. First positional parameter is supposed to be a string with a user name (e.g., user_name) Second positional parameter is supposed to be a string with a user password (e.g., user_password) In your script: Check if two positional parameters were passed to your script when it was invoked If NOT, print an appropriate...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • (In Linux) 1. Create a file to write to from your script and save it as...

    (In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...

  • Cybersecurity Fundamentals Lab #9: Access ControlName: ____________________ If your Kali VM is already up and running,...

    Cybersecurity Fundamentals Lab #9: Access ControlName: ____________________ If your Kali VM is already up and running, login to the root account on the VM via ssh. It does not matter whether you use a command line or GUI sshclient. If your VM is not currently up, use the vSphere web client to start your VM before logging into it via ssh.1: Create an Unprivileged User For some labs, including this one, we will need a non-root user account on the...

  • UNIX File Permission help, please answer the questions in the green boxes. Thank you Lab 03...

    UNIX File Permission help, please answer the questions in the green boxes. Thank you Lab 03 File Permissions In this lab we will: learn about file permissions learn to create symbolic links and hard links Utilities that will be utilized in this Lab: us, cd, less, cat touch, chmod id umask, mkdir, In, echo and redirection Users and Groups Linux supports several methods of controlling access to files an directories. In this lab we are going to learn the traditional...

  • Create a python script to manage a user list that can be modified and saved to...

    Create a python script to manage a user list that can be modified and saved to a text file. Input text file consisting of pairs of usernames and passwords, separated by a colon (:) without any spaces User choice: (‘n’-new user account, ‘e’-edit existing user account, ‘d’- delete existing user account, ‘l’- list user accounts, ‘q’-quit) List of user accounts, error messages when appropriate Output text file consisting of pairs of username and passwords, separated by a colon (:) without...

  • Section IV: Create the following users and groups (remember to setup a password for each user)...

    Section IV: Create the following users and groups (remember to setup a password for each user) User Name Login Name Group Membership Additional Details Naweed SNaweed Finance, Accountant Comment: Naweed Sayed Said SSaid Finance Comment Said Sadat John SJohn Finance Comment: John Smith Ali HAI Finance Comment: Temp worker Account Expiry: 25-Dec-2020 Jenny Denny Human Resources Comment: Jenny Daniel Prince MPrince Human Resources Comment: Michael Prince Faheem NFaheem Human Resources Comment: Faheem Nazeri Ahmad MAhmad IT Developer Comment: Ahmad Mushtiq...

  • Explanation not required. 14. You need to back up the data on a Windows 10 PC...

    Explanation not required. 14. You need to back up the data on a Windows 10 PC before installing a new application. You also need to ensure that you are able to recover individual user files that are replaced or deleted during the installation. What should you do? a. Perform an Automated System Recovery (ASR) backup and Restore. 15. Old Restore Points are deleted from system by: a. Control Panel - System Applet 16. You need to back up the existing...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT