How to add common user to sudoers file?

Hello (first post :-)
I have been working with other linux distros (Opensuse, Ubuntu), now I sticked to Mac :-)
I have a problem or I dont understand well this Mac Distro.  I have a user: john01 that I made "computer administrator" when the Lion OS was first installed.
Well, then I create another called admin, also "computer administrator".
Then I lower my user john01 to "standard user" (this is the user I work with).  So now I know this user has no priviledges so I can test stuff without troubling the system.
Then, I wanted to make john01 able to use de sudo command.  So I terminal as root user, then I used visudo to edit the /etc/sudoers file and I add te following line as told in the man pages:
# User privilege specification
root    ALL=(ALL) ALL
john01     ALL=(ALL) ALL
%admin    ALL=(ALL) ALL
(these are the sudoers file permissions)
sh-3.2# ls -la sudoers
-r--r-----  1 root  wheel  1299 Apr  3 12:31 sudoers
OK, everything shoud be right... BUT, if I try to sudo any command in a terminal windows as john01 user I get this message:
MacDamus:etc john01$ sudo ls
Password:
Sorry, try again.
So, it seems that the jonh01 user added to sudoers doesnt work :-/
Can you help me?
Thanks!
S.

Sebadamus wrote:
My john01 user is on staff group (the same as the admin user)... strange :-/
Every user created in OS X has the default group staff. Here's mine two system users.
alberto is for everyday duties and is a Standard user
imacadm is the Administrator
MyMac:~ alberto$ id alberto
uid=502(alberto) gid=20(staff) groups=20(staff),404(com.apple.access_ssh),401(com.apple.access_screensharing), 402(com.apple.sharepoint.group.1),403(com.apple.sharepoint.group.2),405(com.appl e.sharepoint.group.3),12(everyone),61(localaccounts)
MyMac:~ alberto$ id imacadm
uid=501(imacadm) gid=20(staff) groups=20(staff),404(com.apple.access_ssh),401(com.apple.access_screensharing), 402(com.apple.sharepoint.group.1),403(com.apple.sharepoint.group.2),405(com.appl e.sharepoint.group.3),12(everyone),33(_appstore),61(localaccounts),79(_appserver usr),80(admin),81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer)
With a default sudoers file, alberto cannot sudo, but adding
alberto ALL=(ALL) ALL
to /etc/sudoers he can.
So what you have done is correct.

Similar Messages

  • How to add a user to an existing group????

    Can't seem to find how to add a user to an existing group (staff). I am trying to share data (rw) between my admin account (root) and a development user. On any other UNIX system I would just add the user name in the /etc/group file & logout/login in. It don't work here!
    Suggestions??
    thanx
    mt

    OS X doesn't use /etc/groups. This file is present but does nothing AFAIK.
    Leopard uses directory services to handle groups and users.
    membership in groups with GID>500 can be handled from GUI in system preferences->accounts. other groups can be handled from terminal with dscl (directory services command line). do man dscl for details.
    to add a user to a group you'd do
    sudo dscl . append /groups/groupname GroupMembership username
    However, there should be no need to do it with "staff". every user with an account on your computer is a member of staff by default.

  • How to add multiple users to a role in ECC 6.0

    How to add multiple users (say 1000) to a role in ECC 6.0?

    Hi
    You can actually add multiple users to a role using transaction SU01. From SU01, use the menu Environment->Mass Changes.
    Here you can manually add the users, select them by address or authorisation data. Once you have your user list, you can then add or remove roles and/or profiles.
    Secondly , You can use SU10 to do mass changes to multiple users including role assignments per logical systems
    Also check the following link:
    http://www.sap-img.com/bc021.htm
    I hope this should do it
    regards
    Chen

  • How to add a User Defined Field in OUBI

    Dear Experts
    I would like to find out how to add a user defined field into OUBI from a Customer Care & Billing source system. If anyone could list the steps involved or point me toward a source of documentation that sets out the steps involved it would be much appreciated.
    Cheers
    Tim

    Is there anyone out there who has had experience using OUBI with CC&B?

  • How to Add a user defined field in transaction-PKMC?

    Could anyone tell me the step by step process of how to add a user defined field in transaction-PKMC?
    Moderator message: please do some research before posting.
    Edited by: Thomas Zloch on Jan 16, 2012

    Is there anyone out there who has had experience using OUBI with CC&B?

  • How to add a user defined HTTP header field?

    Hi, everyone!
    I want to add a user defined HTTP header field to a HTTP
    response header.
    I use the following statements in testHeader.jsp
    response.addHeader("myheader", "123");
    response.sendRedirect("middleHeader.jsp");
    in middleHeader.jsp,
    out.print(request.getHeader("myheader"));
    But the output in middleHeader.jsp is null!
    How to add a user defined HTTP header field to a HTTP
    response header? Are there some sample codes?
    Cheers,
    George

    the send redirect actually creates a new request (through the client) and thus a new response
    thus the headers you set in the response are gone for the next request/response
    You can try servletDispatcher.forward

  • How to add a user to the wheel group?

    How to add a user to the wheel group in leopard?

    In Leopard, users can be added to system groups using 'dscl'. For example, while logged into an "admin" account, the command below can be entered using "/Applications" > "Utilities" > "Terminal.app" to add a user "username" to the "wheel" group:<pre>
    sudo /usr/bin/dscl . -append /groups/wheel GroupMembership username</pre>
    If you prefer a GUI, "Workgroup Manager.app", included with the Leopard version of the "Server Admin Tools" can be used.
    http://www.apple.com/support/downloads/serveradmintools105.html

  • Regarding : How to add a user to portal group with the help of webdynpro .

    Hii ,
    I am working on an application in which with the help of an action( Button)  we r adding a user in Ztable in R/3 , as well as  group in portal.
    The user r successfully creating in Ztable but from portal side No user is assigned to Portal group.
    I need coding solution for " How to add a user to portal group with help of webdynpro"
    Any usefull link will also do.
    Pls anyone have any solution ??
    Thnks in advance.
    Rewards r waiting for u .

    Hi,
    Use UME api to add user to portal group.
    Using UME API:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40d562b7-1405-2a10-dfa3-b03148a9bd19
    Regards,
    Naga

  • How to add iphone user agent in safari browser running on windows xp

    How to add new user agent (iphone user agent) to safari browser(version 3) which is running on windows xp os .
    thanks in advance

    UPDATE:  We were able to further identify the root cause of the problem to be when anonymous access is turned off and the subweb is set up to use basic and integrated authentication (IIS settings).  To test this, we removed integrated authentication (leaving only basic authentication in place) and the problem was fixed.  However, this is not a viable solution as we need to use integrated authentication (for various other reasons).

  • How to add a table to pdf file ?

    How to add a table to pdf file ?
    Not able to use the table component. Its not active.
    Any help pls
    Thanks
    Peter
    http://www.ethos.ag

    http://forum.java.sun.com/faq.jsp#format

  • How to add xmp metadata to dae files

    How to add metadatas to 3D dae files...?
    The cad file used as an entry, the 2D files used as textures, environment, shaders...etc?

    Hi,
    Yes sorry about the "Acrobat Tag" , the question was more for the CS6 suite, and the management of DAE files in Bridge and Photoshop Extended in a CQ5 DAM workspace.
    But nevertheless, it should be cool if Acrobat X 3D could import directly Collada files...

  • How to add url to a png file in fireworks?

    I am making a web banner that is 728X90. I want to add a url to the banner so that when you click on it, no matter what state it is on, the link will take you to the website? I just started using fireworks 3 days ago. Please explain in the simplest of terms how to add the url to the banner.
    Also when I drag the file to a new window in Chrome to preview it some of the elements are resized and out of place. How can I fix this?

    Here is a link to the file.
    file:///C:/Users/ACIJ/Pictures/Working%20Product.swf
    See how the words are going off of the banner. In Fireworks its fine. The words all fit but when it shows up in the browser it does not fit.

  • How to add a LLB as a file to a project?

    Hello,
    I will add a LLB as a file to a project.
    If I add the LLB into the project explorer the LLB will be include as a folder and not as a file.
    I found the following description on the NI homepage:
    You also can add an LLB to a project as a file. If you add an LLB as a file, the VIs in the LLB do not appear in the Project Explorer window.
    Right-click the target or a folder under the target, select Add File from the shortcut menu, and use the file dialog box to navigate to the LLB you want to add.
    Select the open folder icon labeled VI with a single period to the right and click the Select button.
    But when I navigate to the LLB, I don't have an icon labeled VI.
    Have anybody an idea or can check this please?
    greetings
    Sascha

    So Sacha, you should probably add a vi inside the llb and then manually edit the .lvproj file..... (or wait until the not too distant future, is the not too distant past)
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How do I setup users to create files in /Users/Shared with group permissions default to rw and not just r?

    I have setup my iMac with 4 user accounts (for the wife and kids).   Some files I would like them to all have access to and that access be read / write.
    I believe I should use the /Users/Shared directory but when a user creates a file there the permissions are rw for the owner but only r for the group & other.   I would like the permissions to default to rw also for group when the file is created so any of them can edit the shared file.
    Basically the umask is defaulting as 0022 and I would like it to be 0002.
    How can I set their account behavior to be this way by default?  Thanks

    You should be able to take the permissions you have set and "apply to enclosed items." I am trying to attach a picture of what this looks like so my apologies if it does not work.
    Highlight your folder you want and go to File>Get Info or command+I and at the bottom where it has Sharing and Permissions, click the lock button to authenticate. Click the gear and click "apply to enclosed items". See if that works.

  • How to add a locally stored video file to a presentation

    Hi all ,
    I want to add a locally stored video file to a presentation .What is the url that i need to use..
    Ur help is much appreciated
    Thanks

    The recommended procedure is to create the presentation on the DMM (upload the video to the DMM) then create a deployment package using the presentation created on the DMM. Once you deploy it to the DMP, the DMM will FTP the video along with presentation files to the DMP which will contain the links to play the video that will be stored locally on the DMP.
    You may want to review the following thread to see how to trigger the local presentation to play and how to update it later:
    https://supportforums.cisco.com/message/3289668
    Regards,
    Fabio Bergamo
    Cisco TAC

Maybe you are looking for