Su To Other Users Fails


Recommended Posts

su is not working the way I am used to using it with Linux, it seems broke, but maybe it is just the way they have OS X configured. Here is what it is doing. I first open the shell from a regular user, I then try to use the command, su root to login in the account called "root". The password just fails, and I can't log in. The strange part is, If I first switch users to my other admin account called shanelindberg, I can then log into the account called "root".

Link to post
Share on other sites
su is not working the way I am used to using it with Linux, it seems broke, but maybe it is just the way they have OS X configured. Here is what it is doing. I first open the shell from a regular user, I then try to use the command, su root to login in the account called "root". The password just fails, and I can't log in. The strange part is, If I first switch users to my other admin account called shanelindberg, I can then log into the account called "root".

Hmmmmm......that's weird. OS X is kinda BSD under the hood so that should work. Maybe it is some permission type thing. Maybe if you log-on as admin you can check the privileges that your regular user has and give your regular user more access. I'm not a mac super user so I could be wrong here.

Link to post
Share on other sites

Is your account a member of groups wheel or admin?

(You should get a complaint about group membership if that's the problem, but I don't recall su producing particularly helpful error messages.)

Edited by jcl
Link to post
Share on other sites
Is your account a member of groups wheel or admin?

(You should get a complaint about group membership if that's the problem, but I don't recall su producing particularly helpful error messages.)

still trying to find where that info is stored on Leopard. Unlike Linux(I have not used it in over a year, my skills are rusty), it does not seemed to be stored in /etc/groups.

It is just a standard account, so I am assuming it is not a member of admin. I should be able to add it to the wheel group.

Link to post
Share on other sites
still trying to find where that info is stored on Leopard. Unlike Linux(I have not used it in over a year, my skills are rusty), it does not seemed to be stored in /etc/groups.

It's in a database somewhere. It looks like you use the dscl utility to access the database. The user-interface seems to be a bit opaque from the examples I've seen. Not unlike accessing the Windows registry via the command-line utilities. I think

# dscl . append /Groups/wheel GroupMembership $USER

will add $USER to wheel but I offer no warranty. Also, I don't know if OS X has a wheel group or if being a member of wheel lets you su.

Edited by jcl
Link to post
Share on other sites

This is kind of interesting. According to the ouptut of the following command only "root" and "shane" are in the wheel group, yet the admin account called shanelindberg could also su to root.

bash-3.2$ dscl . -read /groups/wheel
AppleMetaNodeLocation: /Local/Default
GeneratedUID: ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000000
GroupMembership: root shane
Password: *
PrimaryGroupID: 0
RealName:
System Group
RecordName: wheel
RecordType: dsRecTypeNative:groups
SMBSID: S-1-5-21-100

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...