Change user permissions in Terminal?

Hey everyone. The company I work for has decided that we need to switch multiple users from admin accounts to standard accounts. Since there are multiple people across multiple machines, it will take awhile to remote into each machine and manually flip the flag in system preferences.
Does anyone know if there is a command I can run via ssh in Terminal that will allow me to flip that switch for a specific username?

It looks like your system may be part of an Active Directory or Open Directory domain, since the only admin accounts listed here are the system "root" account and one called "macadmin" which my guess is a single local administrator account used for binding the system to the domain.
In this case you will have to consult your domain administrators to see how the organizational units and accounts are managed for whether or not you can assign or revoke administrative privileges for the networked accounts that it manages. These settings changes will need to be done on the domain controller system, and not on each client system that it manages.

Similar Messages

  • Change User Permissions

    I migrated and later I created a new profile. I then erased the original profile. I had some how in the past changed my short name to a word with a capital and i wasn't very comfortable with that .
    so now my profile wasn't the original on this machine, and it has all lower case.
    But I've been having that whole ACL thing with my repair permissions that take about an hour or so.
    I tried to update my appliations but somehow my admin user doesn't have those permissions.
    I did a repair that told me that I am no longer the 501 user.
    how do i change that?
    I don't seem to have Net Info or whatever utility that is, can i do this in terminal?

    wow, i should have come back and checked. I ended up handling it like a windows computer and just reinstalling the os. now i need to find out why i cannot repartition an external drive (which i thought was supposed to be possible in leopard.)

  • How to change Users name in Terminal Users.

    Hi, I am trying to change my Users name from firstnamelastname to mac on my OSX10.7.5.
    I went to Terminal > Users and tried to rename, however upon reboot, the Terminal > Users always brings back the folder firstnamelastname.
    How can this be changed?
    I did go to Mac > Apple > System Preferences... > System > Users & Groups > Current User. This shows the firstnamelastname has been changed to Mac.
    However I need the Terminal files in /Users also changed from firstnamelastname to Mac.

    Thanks for the reply.
    I went to Mac > Apple > System Preferences... > System > Users & Groups > Login Options > Click the lock to make changes. > Password: > Unlock > Show fast user switching menu as > changed Full Name to Short Name > Click the lock to prevent further changes. > Apple > Restart...
    The Mac still had firstnamelastname in Terminal > /Users rather than the name Mac.
    I then went to Mac > Apple > System Preferences... > System > Users & Groups > Login Options > Click the lock to make changes. > Password: > Unlock > Show fast user switching menu as > changed Short Name to Full Name > Click the lock to prevent further changes. > Apple > Restart...
    The Mac still had firstnamelastname in Terminal > /Users, rather than the name Mac?
    I think the /Users folder with the folder firstnamelastname is some kind of permanent folder when I first set up the Mac, however I would still like to change the folder name, so maybe I need to set up the Mac like new or something...how to do that if there isn't a way of changing the folder name?

  • Change user type with terminal

    Hi all,
    I am trying to find the commands' to be able to change a 'Service' user from an Admin user to a standard user. I have found ways to do it via single user mode however i would like to be able to do this with terminal as i will be using remote desktop to change all the service users in my company. Any help would be great
    Cheers

    I can't take full credit for this. I found it at:
    http://farbflash.de/cgi-bin/blosxom.cgi/?find=snippets
    I did, however, know the command to look for.
    The commands necessary to create an admin user are as follows:
    sudo -s
    niutil -create . /users/username
    niutil -createprop . /users/username passwd \"\"
    niutil -createprop . /users/username home /Users/username
    niutil -createprop . /users/username shell /bin/tcsh
    niutil -createprop . /users/username uid 520
    niutil -createprop . /users/username gid 20
    niutil -createprop . /users/username realname \"First Last\" - if this property is not created, the user won't appear in the loginwindow!
    niutil -appendprop . /groups/admin users username - only for admin users!
    These below are optional:
    niutil -createprop . /users/username hint \"password hint\"
    niutil -createprop . /users/username writerspassword username
    niutil -createprop . /users/username writershint \"\"
    niutil -createprop . /users/username writerspicture username
    niutil -createprop . /users/username sharedDir Public
    exit
    There needs to be a valid home directory, shell, and/or SharedDir for the user. A home directory can be created as easily as:
    sudo mkdir /Users/username
    sudo chown username:staff /Users/username
    Or if you want the default OS X user directory structure:
    sudo cp -rp /System/Library/User Template/English.lproj /Users/username
    sudo chown -R username:staff /Users/username
    (/System/Library/User Template also has other localized language templates)
    Additional info:
    To change an admin user back to an ordinary user:
    sudo niutil -destroyval . /groups/admin users username
    Be careful to leave at least one accessible admin user, otherwise you will lock yourself out of your machine.
    after changing netinfo:
    sudo niutil -resync .
    log out and in the user you changed.

  • Changing user permissions SQL Database Server for OBIEE repository

    Hi All
    We have installed OBIEE 11g and are using database SQL Server 2008 R2.
    The users of the repositories are connected to the master database, and our client query if these users can be disconnected from the master database, so that only stay connected to their corresponding repositories.
    Please help with this question.
    Regards
    Pedro

    Hi,
    You can move out of Master database with SQL server. If such a case is being considered then you have to create a database with SQL server then move all the existing OBI repository's and its users to the new Database. Once this change is complete on the Database side on Weblogic Database connect strings needs to be changed.
    Let me know if this helped.
    Regards,
    Jay

  • Add user to permissions through terminal

    This is killing me. Seems like it should be such a simple task in the terminal but I just can't figure it out.
    What I would like to do is to give another user on my computer write permissions to a file that I own.
    I have tried several different things to no avail. Anyone have ideas? I know how to change the owner of the file, change the group or change my permissions but I just can't figure out how to add another user and set their permissions.
    Thanks for help!

    I am not doing this to one file. I know how to do this from the UI but I am trying to write a script to loop through the files in a folder and allow other specific users to read and write the files.
    Here is what I have tried
    chmod -R 775 nameOfFile
    ## This only changes the permissions for me as the admin
    chgrp -f group nameOfFile
    ## this only changes the group that has access
    chown newOwner nameOfFile
    ## this works but just removes me from ownership instead of adding a user that has read capabilities
    Thanks for your help

  • Hi, I have a PPC Running OSX 10.5.4 and I want to delete the User "Guest"and "Shared"Folders on my HD, they won't let me change the permissions and I keep getting errors that say the permissions should be 0 and are 501 and having files i can't delete that

    Hi, I have a PPC Running OSX 10.5.4 and I want to delete the User "Guest"and "Shared"Folders on my HD, they won't let me change the permissions and I keep getting errors that say the permissions should be 0 and are 501 and having files i can't delete that go on and on ad infinitum... I think it's a virus or a corruption? Can anyone tell me or help me and let me know what I'm dealing with here or wether I'm mistaken and should leave it alone?
    I'd appreciate it.
    Thanks,
    Matt

    mattmakesvidiots wrote:
    Hi, I have a PPC Running OSX 10.5.4 and I want to delete the User "Guest"and "Shared"Folders on my HD
    Why do you want to delete those?  What have you done so far to do that?
    I doubt that Mac has a virus.  On the other hand, your attempts to deleted those folders may have caused corruption.
    Two other comments:
    1) Is there a reason that Mac hasn't been updated to OS X 10.5.8?
    2) You've been misled by the poor field labeling on this Web site into trying to type your entire post into the "subject" field.  In the future, just put a short summary of your post into that field.

  • Changing user folder permissions

    My wife and I both have admin accounts on my computer. I want to be able to easily transfer files from my user folder to hers without running into permissions problems. For example, I may want to take a photo from my Pictures folder and drop it in her Pictures folder. I can't do that because access is blocked to everyone but her. It's irritating to have to drop the file on a neutral ground, log in to her account, and take the file and put it in her folder. I logged in as root and tried to change the permissions by giving admin group read and write privileges but it gives an error of -60002 if I try that. I can't change the permissions while not logged in as root since the option is greyed out. Any ideas? I don't care one bit about "compromising security".

    Hi Xeep,
    Error -60002 is "The authorization parameter is invalid".
    From your account, have you first tried changing the Owner to yu, then the Group to admin, then the owner back to her?
    Or better yet, try BatChMod...
    http://www.macchampion.com/index.shtml

  • How do you give user permissions to access a terminal server?

    How do you give user permissions to access a terminal server?

    Refer : http://technet.microsoft.com/en-us/library/cc781509(v=ws.10).aspx
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • Changing permissions in terminal

    Hi, I'm trying to change the permissions on an app through terminal. The app name is more than one word (Dora's Big Birthday Adventure.app) and I can't seem to do it. I'm trying to use the chmod command, and it says that the file name does not exist. Can anyone help?

    Enclose the name of the file in "quotations marks" to make Terminal ignore the space.
    >Dora's Big Adventure.app
    will return
    Dora: no such file or directory
    you need to type
    >"Dora's Big Adventure.app"

  • Changing Sharing & Permissions on a Mac OS Extended External Drive

    I'm using ChronoSync to back up to 4 external hard drives. Three of them were formatted as Mac OS Extended (Journaled), while the 4th is not journaled. On the journaled HD's, I can change the privileges for me, staff and everyone in Get Info; I can also check or uncheck "Ignore ownership on this volume" on 2 of them. My Time Machine volume doesn't have the option to ignore ownership. My issue is that changing privileges on the Mac OS Extended volume is grayed out, and the box to ignore ownership is checked. Therefore, Chronosync cannot write to the volume.
    I could try to use chmod in Terminal to change permissions on this volume, but I don't know the syntax to get to a mounted volume (I know they're listed in /Volumes).
    So I have two questions:
    1. Does this issue indicate a substantial difference between journaled and not-journaled Mac OS file systems?
    2. What is the syntax in Terminal to change the permissions on the volume (name is Video Backup) so that I can at least uncheck the "Ignore ownership on this volume"?
    I apologize if this has been asked and answered elsewhere on this forum, but I wasn't able to locate such a discussion.
    Thanks,
    Nick
    Message was edited by: nickditoro

    Hi mackjack,
    The commands Niel posted were to regain access to a drive not to change existing permissions. Nonetheless, I executed them so at least I know the syntax to use in order to get to an external hard drive (something I hadn't known before), so thanks!!! I might try chmod 770
    Update:
    Now that I know the basic syntax (thanks to you) I can now change permissions for any user I like. Chronosync is able to synchronize to the drive.
    Thanks!!
    Nick
    Message was edited by: nickditoro

  • Unknown User Permissions - Erase and Install Backup Plan

    Hi everyone,
    I upgraded from Tiger and therefore have the unknown user permissions problems. I'd like to erase and install my system and am writing to verify the following:
    If I copy my data (with the funny permissions) to a Powerbook in Firewire Disk Mode, reinstall Leopard on my new iMac, then copy the data back from the Powerbook in disk target mode, will the permissions be fixed?
    Thank you, Tom Bertram.

    Thomas,
    If you are talking about the "unknown" group problem seen in the permissions portion of Get Info, be aware that Apple is in the process of putting out a Knowledge Base article to address this and it may be wise to be patient a little longer.
    The user accounts inherited from Tiger belong to a "group" that has a missing piece of information -- a group name that Leopard wants. The installer should have dealt with this but it didn't. Anyway, a couple of simple Terminal commands can fix this for each such account. Once the Group description is proper, there will no longer be any need to change the group membership of your files.
    Unfortunately the first couple tries Apple made of describing how to do this appear to be in error. See the following thread:
    http://discussions.apple.com/thread.jspa?threadID=1280472&tstart=0
    The correct commands should be posted by Apple shortly and then you can resolve this without having to do a whole re-install.
    --Bob

  • Mass change file permissions

    Long story but basically a couple of months ago one of my logins just suddenly dissapeared. Would not let me in with that user name...no good. Was still able to access the files going through the root, but when I created a new login I was unable to access the old login's files...only through the root. Is there a way to mass change the permissions so that the files are accessible?
    much thanks!
    aaron

    Rippeddisc wrote:
    Long story but basically a couple of months ago one of my logins just suddenly dissapeared. Would not let me in with that user name...no good. Was still able to access the files going through the root, but when I created a new login I was unable to access the old login's files...only through the root. Is there a way to mass change the permissions so that the files are accessible?
    yes, it's possible but you have to do it from terminal. DO NOT try to change permissions recursively on your old home folder from Finder. However, none of this is probably necessary and it should be a simple matter to recreate your old account with the old homedirectory. would you prefer that or do you really want to just move the files from the old home directory to the new one?
    if you don't want to recreate the old user,
    to recursively change permissions on that home directory run the following terminal command from the account you want to access those files from
    sudo chown -R $USER /users/oldusername
    instead of oldusername put the short name of the user that disappeared.
    You'll have to enter your admin password (which you won't see). that's normal.
    much thanks!
    aaron
    Message was edited by: V.K.

  • Broken permissions in Terminal

    Hi everybody,
    lately, I had to work a lot in the terminal. One problem I encounter all the time is that many applications (such as apt-get) don't work because they don't have the permission to operate on certain files. chmod doesn't work either because it tells me I'm not allowed to change the permissions for those specific files. And sudo tells me I supplied the wrong password. What is wrong here? Is the root password different from my admin password on MacOS X?
    I tried to repair the permissions with the Disk Utility, but it didn't work either.

    Yes, the root password is different from your admin password. When you want to start an root process, you can use: sudo process adminpassword. Or make a root shell with: sudo su adminpassword. Sudo allows you, to execute root processes with your uid.
    But when you use su (substitute user). You must have the user root with the rootpassword.

  • How can I change 'Custom' permissions for TM backup disc?

    I have recently had some big problems with permissions on the main disk of my G5 iMac. After fixing permissions, Time Machine then reported that my backup disk (an external 300Gb FireWire disk) was read-only and so backups couldn't take place, and the icon for the disk has a padlock shown on it. Looking at the Get Info for the disk and unlocking 'Sharing and Permissions', I see a line saying 'You have custom access', and that all permissions shown are set to 'Custom'. I don't know what this means - and worse, I can't change the permissions to any of the normal settings (Read & Write, Read Only, Write only (drop box)), and I can't check 'Ignore ownership of this problem'.
    I am thus unable to do any backup. The system worked fine for at least a year before this. Has anyone any idea what 'custom' means and what I should do. I haven't found anything that seems relevant by searching this forum.

    Time Machine uses special "deny everybody everything" permissions. You should not change them.
    FIrst, do a +Repair Disk+ (not permissions) on the TM volume via DIsk Utility (in your Applications/Utilities folder).
    If that doesn't correct it,
    If you only have a partial backup, or don't need the ones you've done, the simplest thing to do is just erase the disk/partition.
    If you don't want to erase it, here's a workaround:
    First, you need to find the name of the hidden file that's causing the problem Click here to download the +Time Machine Buddy+ widget.
    It shows the messages from your logs for one TM backup run at a time, in a small window. If it shows a message like this: "You do not have appropriate access privileges to save file “.<nnnnnnn>” in folder <Name>"* skip to *Open the Terminal App* below.
    If not, Click here to download the +Tinker Tool+ app. It allows you to change the Finder to show hidden files (among many other things). Select the first option under Finder, then click +Relaunch Finder+ at the bottom. Reverse this when done.
    In a Finder window, select your Time Machine drive/partition. The very first file shown should have a name consisting of a period (dot) followed by 12 numbers and/or letters. (This is your Mac's Ethernet address). Copy or make a note of it.
    Open the Terminal app (in your Applications/Utilities folder).
    In Terminal, the prompt looks like this: user-xxxxxx:~ <your name>$
    (where <your name> is your short user name). It's followed by a non-blinking block cursor (unless it's been changed via Terminal > Preferences).
    At the prompt, type the following exactly as shown, substituting the name of your TM drive exactly, including any spaces, between the quotes; and the string of numbers & letters from the message where the series of x's are (keep the dot):
    <pre> sudo chmod 644 /volumes/"TM drive name"/.xxxxxxxxxxxx</pre>
    example: sudo chmod 644 /volumes/"TM Backups"/.0a1b2c3d4e5f
    Press Return. You'll get some warnings and a request for your Administrator's password. Type it in (it won't be displayed) and press Return again.
    Then try a +Back Up Now+ from the TM icon in your Menubar, or by control-clicking (right-clicking) the TM icon in your dock.

Maybe you are looking for