Masalah
Saya memiliki Windows XP SP3 di sini di VMWare, instalasi yang cukup baru, dengan hanya beberapa aplikasi (Browser, Office) diinstal.
Ketika saya:
- Masuk sebagai Administrator lokal
- Menggunakan GUI Explorer saya menghubungkan server jauh sebagai X:
- Luncurkan "Command prompt" melalui tautan menu Mulai dengan:
a) meluncurkan tautan secara manual
b) mengklik kanan tautan, memilih "Run as ..." dan mengisi kredensial pengguna yang sama
yang pertama berfungsi dengan baik, tetapi dalam yang terakhir, cmd.exe
tidak dapat mengakses X:
:
C:\Documents and Settings\Administrator>net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
Unavailable X: \\server\share\folder Microsoft Windows Network
The command completed successfully.
C:\Documents and Settings\Administrator>x:
The system cannot find the drive specified.
C:\Documents and Settings\Administrator>dir x:\
The system cannot find the path specified.
C:\Documents and Settings\Administrator>
Pra-analisis
Saya telah membandingkan berbagai properti yang bisa saya temukan tentang prosesnya (saya tidak yakin semuanya relevan): lingkungan, pegangan terbuka, buka DLL, tab "Keamanan" di Process Explorer dan semuanya sama.
Satu hal yang saya temukan adalah ketika menonton upaya dengan Process Monitor, yang berhasil melakukan empat langkah lagi:
"Time of Day","Process Name","PID","Operation","Path","Result","Detail"
"10:55:33.4784227 AM","cmd.exe","2792","RegOpenKey","HKCU","SUCCESS","Desired Access: Maximum Allowed"
"10:55:33.4785212 AM","cmd.exe","2792","RegOpenKey","HKCU\Software\Policies\Microsoft\Control Panel\Desktop","NAME NOT FOUND","Desired Access: Read"
"10:55:33.4785569 AM","cmd.exe","2792","RegOpenKey","HKCU\Control Panel\Desktop","SUCCESS","Desired Access: Read"
"10:55:33.4786210 AM","cmd.exe","2792","RegQueryValue","HKCU\Control Panel\Desktop\MultiUILanguageId","NAME NOT FOUND","Length: 256"
"10:55:33.4786650 AM","cmd.exe","2792","RegCloseKey","HKCU\Control Panel\Desktop","SUCCESS",""
"10:55:33.4787131 AM","cmd.exe","2792","RegCloseKey","HKCU","SUCCESS",""
"10:55:33.4912359 AM","cmd.exe","2792","CreateFile","X:","SUCCESS","Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened"
"10:55:33.4924104 AM","cmd.exe","2792","QueryNameInformationFile","X:","SUCCESS","Name: \server\share\folder"
"10:55:33.4924860 AM","cmd.exe","2792","QueryInformationVolume","X:","SUCCESS","VolumeCreationTime: 9/6/2005 2:05:04 PM, VolumeSerialNumber: 109F-0912, SupportsObjects: True, VolumeLabel: DATA"
"10:55:33.4932539 AM","cmd.exe","2792","CloseFile","X:","SUCCESS",""
"10:55:33.4937810 AM","cmd.exe","2792","RegOpenKey","HKCU","SUCCESS","Desired Access: Maximum Allowed"
"10:55:33.4939097 AM","cmd.exe","2792","RegOpenKey","HKCU\Software\Policies\Microsoft\Control Panel\Desktop","NAME NOT FOUND","Desired Access: Read"
"10:55:33.4939451 AM","cmd.exe","2792","RegOpenKey","HKCU\Control Panel\Desktop","SUCCESS","Desired Access: Read"
"10:55:33.4940098 AM","cmd.exe","2792","RegQueryValue","HKCU\Control Panel\Desktop\MultiUILanguageId","NAME NOT FOUND","Length: 256"
"10:55:33.4940548 AM","cmd.exe","2792","RegCloseKey","HKCU\Control Panel\Desktop","SUCCESS",""
"10:55:33.4941023 AM","cmd.exe","2792","RegCloseKey","HKCU","SUCCESS",""
Langkah-langkah CreateFile, Query * dan, CloseFile hilang dalam log yang gagal.
Pertanyaan
Apa yang dapat menyebabkan perbedaan seperti itu? Apakah ini bug?
windows-xp
command-line
Alois Mahdal
sumber
sumber
Jawaban:
Dimulai dengan Windows XP, masing-masing Sesi masuk LSA ( tidak berhubungan ke sesi Layanan Terminal) telah set sendiri penugasan huruf drive. Jika Anda menggunakan Jalankan Sebagai ... - apakah akunnya sama atau berbeda - fungsi masih membuat sesi masuk terpisah dengan kredensial yang diberikan.
Lebih:
sumber
systemd
).Karena drive yang dipetakan ada di! PER PENGGUNA! dasar, pengguna lain (yang Anda lakukan RUN AS) tidak dapat melihatnya!
Untuk menang, Anda perlu mencoba memetakan drive dalam batch yang dijalankan sebagai pengguna terlebih dahulu.
sumber