+ Post New Thread
Results 1 to 14 of 14
How do you do....it? Thread, Use RUNAS to open a shared folder in Technical; For a long time I've had the bad habit of working as domain admin (yes I know...) Now I've adopted ...
  1. #1
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,014
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    Use RUNAS to open a shared folder

    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.

  2. #2

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Use RUNAS to open a shared folder

    Code:
    runas /user:domain\administrator "explorer \\server\share"

  3. #3
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,014
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    Re: Use RUNAS to open a shared folder

    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!

  4. #4
    pooley's Avatar
    Join Date
    Sep 2005
    Location
    S Wales
    Posts
    1,131
    Thank Post
    78
    Thanked 118 Times in 99 Posts
    Rep Power
    67

    Re: Use RUNAS to open a shared folder

    Why not just \\server\share and put in your uid&pass when prompted ?

  5. #5
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,014
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    Re: Use RUNAS to open a shared folder

    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.

  6. #6
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,014
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    Re: Use RUNAS to open a shared folder

    @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.

  7. #7

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Use RUNAS to open a shared folder

    Bloody useless MS... Try this.

    http://www.stefan-kuhr.de/supsu/main.php3

  8. #8
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,014
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    Re: Use RUNAS to open a shared folder

    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.

  9. #9

    Join Date
    Jun 2005
    Posts
    223
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    30

    Re: Use RUNAS to open a shared folder

    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.

  10. #10
    Quackers's Avatar
    Join Date
    Jan 2006
    Posts
    1,319
    Thank Post
    40
    Thanked 142 Times in 117 Posts
    Rep Power
    53

    Re: Use RUNAS to open a shared folder

    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.

  11. #11
    OverWorked's Avatar
    Join Date
    Jul 2005
    Location
    N. Yorks
    Posts
    1,014
    Thank Post
    198
    Thanked 42 Times in 34 Posts
    Rep Power
    30

    Re: Use RUNAS to open a shared folder

    Thanks, bob & quackers - I'll look into it later.

    I've installed SUperior SU, and very good it is too.

  12. #12

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    639
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324

    Re: Use RUNAS to open a shared folder

    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.

  13. #13
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,966
    Thank Post
    248
    Thanked 49 Times in 45 Posts
    Blog Entries
    2
    Rep Power
    46

    Re: Use RUNAS to open a shared folder

    I frequently use the local admin account, then map shares with my credentials. Is this good practice?

  14. #14

    Join Date
    May 2013
    Location
    Los Angeles, CA
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by mark View Post
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 5
    Last Post: 3rd January 2008, 02:08 PM
  2. Replies: 3
    Last Post: 12th December 2007, 08:52 AM
  3. Open each folder in the same window
    By mark in forum Windows
    Replies: 2
    Last Post: 30th May 2007, 01:09 PM
  4. Replies: 15
    Last Post: 12th October 2006, 09:37 PM
  5. Disable runas
    By Norphy in forum Windows
    Replies: 6
    Last Post: 23rd March 2006, 05:06 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •