Jump to content

Recommended Posts

Posted

For a long time I've had the bad habit of working as domain admin (yes I know...)

 

Now I've adopted best practise and am using a normal user account and runas when needed. The only thing I haven't worked out is how to use runas to open a shared folder on a server. I've tried

 

runas /user:domain\administrator //server/share

 

but it doesn't work.

 

Any suggestions? I've read that it's possible to create a shortcut with other credentials, but that leaves the shortcut behind afterwards.

Posted

Thanks, Geoff

 

I've tried this, both at the run prompt, and again at a command prompt to see what was happening. I get this, but no window opens.

 

H:\>runas /user:uws\administrator "explorer \\wharfedale-pdc\apps"

Enter the password for uws\administrator:

Attempting to start explorer \\wharfedale-pdc\apps as user "uws\administrator" .

..

 

H:\>

 

I'm missing something somewhere. Help!

Posted

@pooley

 

I don't get prompted, presumably because my account already has read access to the share. Explorer just opens the window without a prompt, as it should, but I don't have write access.

Posted

Here's something else weird. If I click on the 'command prompt' icon from the start menu and run as domain admin, I get:-

 

C:\windows\system32\cmd.exe

The directory name is invalid.

 

But if I run the command prompt with my normal account, it works fine.

 

I've checked the ntfs permissions, and domain admins (as members of local admins) have full access to cmd.exe.

 

Similar thing happens if I RUNAS the event viewer. Works with normal acct but not the domain admin. The only things it does work for are the server 2003 admin pack tools.

Posted
The command prompt thing sounds like it is trying to start the prompt in an invalid location. Is it picking this shortcut from a redirected start menu? Perhaps you created the shortcut on a system where windows lived in c:\windows and you are trying to run it on a system where windows lives in c:\winnt ? The normal users command prompt will start in their home directory, so if this has been set they won't see the same problem.
Posted
Are you wanting to use runas on an already open share? If so that you cannot do what you want to do. Its the same as you cannot use runas to run exe's on network drives since your already taking to the server using one set of credentials. Older versions of Windows NT allowed this but XP and 2003/2000 server do not. Microsoft altered the way access to shares works and your user sessions.
Posted
You may have to map a drive first to the share as a given user, and then just run explorer.exe and point it to the newly mounted network drive.
  • 7 years later...
Posted
I frequently use the local admin account, then map shares with my credentials. Is this good practice?

 

You can just use the "Connect as a different user" option in Map Drive if your ever not logged in as admin. As for is it good practice, I would say anytime your logged in as the root administrator you face a risk.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...