fredouille Posted November 13, 2007 Share Posted November 13, 2007 hello I'm using leo 10.5 flat-iamage with EFI v4 and I noticed a strange thing, when i use the Terminal utility, and prompt sudo -s, then password is required, I noticed that I keep on staying loged as an user and not as #root like when I'm under TIGER. BTW I can repair permission with diskutility whitout any crash. Does it ring the bell to somebody ? Sorry for my english but i come from France and as you know, French speak very bad foreign languages ! Thank you in advance fred Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/ Share on other sites More sharing options...
macgirl Posted November 14, 2007 Share Posted November 14, 2007 Happens with Leopard when you type sudo su (which I prefer) or sudo -s is that now it runs /bin/sh instead of /bin/bash, so it does not run the /etc/bashrc, you can change the root shell with chsc. But also you can type whoami afer you sudo -s and check if you are really root. I changed my root shell, and also made a .bashrc on root's home with the same aliases and things on /etc/bashrc so now the prompt says what user I am Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-505347 Share on other sites More sharing options...
zarac Posted November 14, 2007 Share Posted November 14, 2007 when i first installed leopard, i had the same problem: could not change to root. it turned out leopard doesn't like administrators with no password in tiger this was no problem, but leopard is more cautious. now, if you have a blank password, you cannot change it to anything because leopard won't let you use blank password as "old password" (needed for assigning a new one). ***EDIT: it does allow changing a blank password but you have to type something into the box and then delete it. if this is your problem, you'll have to edit sudoers file (click here for info) to accept passwordless admins: 1. enable root account (Applications/Utilities/Directory Utility - Choose Enable Root User from the Edit menu) 2. login as root user and edit /etc/sudoers *** be very careful when doing this - sudoers is a very important system file and you should use visudo command (click here for info) when editing it. *** change the %admin line to: %admin ALL=(ALL) NOPASSWD: ALL hope this helped Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-505447 Share on other sites More sharing options...
fredouille Posted November 14, 2007 Author Share Posted November 14, 2007 hello, and thank you Macgirl and Zarac, it seems to be a "bit complicated for me" First, I tried this : http://forum.insanelymac.com/index.php?showtopic=24675 ( but the shell told me that the modifications i made weren't ok, then I tried with your methode Zarac but i'm stuck in the second step :2. login as root user and edit /etc/sudoers *** be very careful when doing this - sudoers is a very important system file and you should use visudo command (click here for info) when editing it. *** change the %admin line to: CODE %admin ALL=(ALL) NOPASSWD: ALL In fact i don't understand how i can login as root user and how i can edit the etc/sudoers, maybe you can help me again ( I precise that i rode sudoers file and visudo command but the "english level" is much complicated for the little french I am !! lol thank you BTW fred Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-505604 Share on other sites More sharing options...
zarac Posted November 14, 2007 Share Posted November 14, 2007 @fredouille: if you already enabled root account as i described, simply logout (click on the apple and choose logout). If the login screen shows a list of users it won't show the "root" user so you will have to select "Other". Then in the username field type "root", under that type your root password, and voila - you're root. And now, for the tricky part. When logged in as root, open terminal and type visudo -f /etc/sudoers If you never worked with vi editor in unix, you'll be quite confused. Maybe it would be smart to read info on visudo or vi editor. You cannot edit the file until you enter "INSERT" mode (press "i"), and then edit the file as described before. Then press Escape to exit "INSERT" mode, and type :w! /etc/sudoers - semicolon ":" is used to give commands to vi (or visudo) - after that you can give commands - w stands for "write" command and an exclamation sign "!" stands for overwrite when you see message "file written" or something like that, simply close terminal, logout, and login as regular user. Now, after typing sudo -s in terminal you should be able to do root stuff. hope this is not too complicated. good luck! Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-506130 Share on other sites More sharing options...
fredouille Posted November 14, 2007 Author Share Posted November 14, 2007 hello zarac thank you for your reply thank you for your help now it runs YEEEEES MAAAAN ! Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-506206 Share on other sites More sharing options...
Azzurra Posted November 16, 2007 Share Posted November 16, 2007 I was able to change the blank password to a new one. Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-508583 Share on other sites More sharing options...
ptesone Posted November 16, 2007 Share Posted November 16, 2007 thanx, I was wondering how to fix this. . . Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-508650 Share on other sites More sharing options...
zarac Posted January 17, 2008 Share Posted January 17, 2008 I was able to change the blank password to a new one. yep, it's possible if you enter anything into "old password" box and then delete it leaving the box empty. i edited my post up there. but nevertheless, it's good to know things about sudoers file and how to edit it Link to comment https://www.insanelymac.com/forum/topic/71220-sudo-s-problem/#findComment-583113 Share on other sites More sharing options...
Recommended Posts