OverWorked Posted January 31, 2006 Posted January 31, 2006 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.
Geoff Posted January 31, 2006 Posted January 31, 2006 runas /user:domain\administrator "explorer \\server\share"
OverWorked Posted January 31, 2006 Author Posted January 31, 2006 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!
pooley Posted January 31, 2006 Posted January 31, 2006 Why not just \\server\share and put in your uid&pass when prompted ?
OverWorked Posted January 31, 2006 Author Posted January 31, 2006 More info. If I try to create a shortcut to access it, the 'run with different credentials' option is greyed out, so I can't set it.
OverWorked Posted January 31, 2006 Author Posted January 31, 2006 @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.
Geoff Posted January 31, 2006 Posted January 31, 2006 Bloody useless MS... Try this. http://www.stefan-kuhr.de/supsu/main.php3
OverWorked Posted January 31, 2006 Author Posted January 31, 2006 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.
_Bob_ Posted January 31, 2006 Posted January 31, 2006 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.
Quackers Posted January 31, 2006 Posted January 31, 2006 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.
OverWorked Posted January 31, 2006 Author Posted January 31, 2006 Thanks, bob & quackers - I'll look into it later. I've installed SUperior SU, and very good it is too.
webman Posted January 31, 2006 Posted January 31, 2006 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.
MkII Posted January 31, 2006 Posted January 31, 2006 I frequently use the local admin account, then map shares with my credentials. Is this good practice?
SynkOptik Posted May 29, 2013 Posted May 29, 2013 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now