Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > problem with "su" in terminal

problem with "su" in terminal
Thread Tools
cuz
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 10:10 AM
 
Maybe someone can help me. I'm using the "su" command in the Terminal to get a password prompt. I get the prompt, but when I enter my password, I get a message saying "Sorry," so I guess I'm being blocked out. There's no other user user account but mine, so I know it's not an issue of who's logged in and who isn't. Does anyone know what's going on?

Thanks in advance...da CuZ
-cuzin
     
wadesworld
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 28, 2001, 10:14 AM
 
Yes. The root account is disabled by default (and should stay that way).

To do a command as root, do "sudo <command>"

and if you want a root prompt, do "sudo -s".

when prompted for a password, put in the password for the admin account.

Wade
     
Lord Kronos
Senior User
Join Date: Mar 2001
Location: Earth
Status: Offline
Reply With Quote
May 28, 2001, 10:15 AM
 
su = substitute user (root by default). 'su' allows you to log in as root, the prompted password is your root password, if you haven't set any, it'll never work. You should search the fora, you'll find more info on 'su' and 'sudo'.

------------------
"Sing you fools ! But you got it wrong..."

[This message has been edited by Lord Kronos (edited 05-28-2001).]
"Sing you fools ! But you got it wrong..."
     
cuz  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 10:20 AM
 
worked like a charm guys..thanks to both of you for.your help
-cuzin
     
cuz  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 11:11 AM
 
so if i login using sudo -s, I'm the root account? 'cause that's ehat I did
-cuzin
     
wadesworld
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 28, 2001, 11:17 AM
 
so if i login using sudo -s, I'm the root account? 'cause that's ehat I did
Well, not login, no. But if you do "sudo -s" from a terminal window and enter your admin password, you'll be root. (And I think that's what you were saying).

Wade
     
cuz  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 11:36 AM
 
Hey...that's bad.
-cuzin
     
Lord Kronos
Senior User
Join Date: Mar 2001
Location: Earth
Status: Offline
Reply With Quote
May 28, 2001, 11:39 AM
 
You don't need to log in as root, this is what 'sudo' is for. 'sudo' is a way to get root privileges without having to actually log in as root.

------------------
"Sing you fools ! But you got it wrong..."
"Sing you fools ! But you got it wrong..."
     
cuz  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 11:42 AM
 
Buy everytime I type sudo -n or sudo -p, nothing happens.
-cuzin
     
Lord Kronos
Senior User
Join Date: Mar 2001
Location: Earth
Status: Offline
Reply With Quote
May 28, 2001, 11:44 AM
 
What would you like to do as root ?

------------------
"Sing you fools ! But you got it wrong..."
"Sing you fools ! But you got it wrong..."
     
cuz  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 11:46 AM
 
login. what i'm trying to do is put the BitchX.app in the usr/local/bin file.
-cuzin
     
Lord Kronos
Senior User
Join Date: Mar 2001
Location: Earth
Status: Offline
Reply With Quote
May 28, 2001, 11:49 AM
 
Try this then:
'sudo mv your_files usr/local/bin'.

------------------
"Sing you fools ! But you got it wrong..."
"Sing you fools ! But you got it wrong..."
     
cuz  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 12:05 PM
 
that works...thanks, Kronos.

As a test, after I installed it, I logged into usr/local/bin as root, then I used rm -R to delete the BitchX file. Just to see the difference...

I see why logging in as root is dangerous...it's possible to delete the lower-tier UNIX files. That's why I was denied direct access to /bin, as a safeguard so I don't screw stuff up. Am I right?

And again, thanks Kronos.
-cuzin
     
Lord Kronos
Senior User
Join Date: Mar 2001
Location: Earth
Status: Offline
Reply With Quote
May 28, 2001, 12:07 PM
 
Originally posted by cuz:
[...]
I see why logging in as root is dangerous...it's possible to delete the lower-tier UNIX files. That's why I was denied direct access to /bin, as a safeguard so I don't screw stuff up. Am I right?
[...]
You're absolutely right .

------------------
"Sing you fools ! But you got it wrong..."
"Sing you fools ! But you got it wrong..."
     
cuz  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Da Big Apple, USA
Status: Offline
Reply With Quote
May 28, 2001, 12:14 PM
 
You learn somehin' new everyday...

[This message has been edited by cuz (edited 05-28-2001).]
-cuzin
     
Scott_H
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
May 28, 2001, 12:23 PM
 
As always read the man page. Read the man page!


>man su
>man sudo

I'm going to move this over to the Mac OS X Usage & Support forum. Click through to find your post.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:44 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,