Using the GUI
Using the command line
Using PowerShell
New-PSDrive
# Add a network drive
$pass="Your Password"|ConvertTo-SecureString -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PsCredential('Your Username',$pass)
New-PSDrive -Name X -PSProvider FileSystem -Root \\fs.example.com\share -Credential $Cred -Persist
# List the network drives
Get-PSDrive
# Remove the network drives
Remove-PSDrive -Name X -PSProvider FileSystem
net use
$FS2 = "\\fs.example.com\share"
$username = "Your Username"
$password = "Your Password"
net use $FS2 $password /USER:$username
Username / Password
When mapping the network drive, there may be a prompt to enter a username and password.
If the Samba is being used for the share, on the Samba server, use the smbpasswd command to add a users password to the SMB database. You can now connect to the Samba share using the username and password.
[root@server1 ~]# smbpasswd -a jeremy
New SMB password: ********
Retype new SMB password: ********