+ Post New Thread
Results 1 to 4 of 4
Wireless Networks Thread, Permissions Issue in Technical; Hi Server2003/XP I'm trying to run the following two lines in a batch file at the students' logon...... Cacls C:\ ...
  1. #1

    Join Date
    Jun 2006
    Location
    Manchester
    Posts
    58
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Permissions Issue

    Hi
    Server2003/XP
    I'm trying to run the following two lines in a batch file at the students' logon......

    Cacls C:\ /e /g "studentgroup":r
    net time \\SERVER /set /yes

    I've stuck it in Netlogon and it runs but come up with an Access is denied error and the net time command says 'A required priviledge in not held by the client'.

    It works fine for staff.

    I realise it's a permissions issue in that the students haven't got permissions to alter their priviliges to the local C: drive but I'm not quite sure how to get round it (other than to go round and log in each computer with a staff account!). Many thanks.

  2. #2
    DrPerceptron's Avatar
    Join Date
    Dec 2008
    Location
    In a house
    Posts
    932
    Thank Post
    37
    Thanked 135 Times in 115 Posts
    Rep Power
    41
    You might be able to get around it using the runas /user:<username> switch and specifying a password...

    Why would you want to do this though out of interest? Surely there are other ways of going about what you intend to achieve?

  3. #3
    azrael78's Avatar
    Join Date
    Sep 2007
    Location
    Devon
    Posts
    383
    Thank Post
    47
    Thanked 37 Times in 33 Posts
    Rep Power
    21
    Quote Originally Posted by markesmith View Post
    Cacls C:\ /e /g "studentgroup":r
    *cringe*

    Not wanting to sound like an arse here but why would you want to grant the students any kind of extra permission to C:?

    In any case - if you want this to run at logon you have a few options...

    1) Group Policy - You can use Group Policies to assign local security rights over files and folders, this would be far quicker and easier than a local script.

    2) As already mentioned - RunAs - There are versions of RunAs that can take an admin login and password and run your command as an administrator, but these are unsecure at the best of times.

    3) Create an AutoIT script to do this change, package it to run as an administrator - This is a good idea but only if you know AutoIT or can learn enough to just do what you want.

    The best idea is to use Group Policy if you have to grant them the rights, if you can't do that - then I'd seriously look at #3 long before I would look at #2.

    HTH,

    Az

  4. #4

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,069
    Thank Post
    210
    Thanked 430 Times in 310 Posts
    Rep Power
    144
    How about running it as a machine startup script insted of a logon script? Startup scripts run under the local system account, and can modify permissions on any files on the C:\

    Also insted of using the CACLS executable, I tend to use the VBS version of XCACLS if I'm changing file permissions using scripts, I find it more reliable.

    Mike.

SHARE:
+ Post New Thread

Similar Threads

  1. Permissions issue
    By laserblazer in forum Windows
    Replies: 3
    Last Post: 17th November 2008, 01:56 PM
  2. Replies: 5
    Last Post: 3rd January 2008, 02:08 PM
  3. Logon issue and Printers issue
    By mrbios in forum Windows
    Replies: 2
    Last Post: 17th December 2007, 12:40 PM
  4. Permissions?
    By kerrymoralee9280 in forum Windows
    Replies: 0
    Last Post: 1st August 2007, 09:25 AM
  5. Replies: 3
    Last Post: 9th September 2006, 08:13 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
  •