The Following User Says Thank You to javispedro For This Useful Post: | ||
![]() |
2010-12-24
, 03:34
|
Posts: 21 |
Thanked: 0 times |
Joined on Nov 2010
@ india
|
#22
|
Note: please check if you're not setting the suid bit on the entire busybox binary. (su might be a symlink to busybox)
If you are, then you will in trouble soon.
Suggestion: forget about everything said on this thread and just use "root" or "sudo gainroot".
![]() |
2010-12-24
, 10:47
|
Posts: 515 |
Thanked: 266 times |
Joined on Nov 2009
@ Oelsted, Denmark
|
#23
|
Note: please check if you're not setting the suid bit on the entire busybox binary. (su might be a symlink to busybox)
If you are, then you will in trouble soon.
Suggestion: forget about everything said on this thread and just use "root" or "sudo gainroot".
N900:~$ ls -l /bin/su lrwxrwxrwx 1 root root 7 2010-05-11 20:11 /bin/su -> busybox
su - chmod u-s /bin/su
![]() |
2010-12-24
, 12:48
|
Posts: 21 |
Thanked: 0 times |
Joined on Nov 2010
@ india
|
#24
|
You're absolutely right...It IS a symlink to busybox:
In my defense, I did say "I'm not sure this is something I would want to do"...Code:N900:~$ ls -l /bin/su lrwxrwxrwx 1 root root 7 2010-05-11 20:11 /bin/su -> busybox
To clean up the mess run this:
And as said earlier as 'user' just type 'root' to become root (no password needed).Code:su - chmod u-s /bin/su
After this change You won't be able to use 'su -' anymore.
![]() |
2010-12-24
, 13:20
|
Posts: 701 |
Thanked: 585 times |
Joined on Sep 2010
@ London, England
|
#25
|
it was asking for a password (however it was not accepting the paasword) but now if i try to do sudo su -
it says
sorry, user user is not allowed to execute '/bin/su -' as root on Nokia-900.
i am pretty sure this wasnt the case earlier.
can u help me with this as well sir.
![]() |
2010-12-24
, 13:21
|
Posts: 21 |
Thanked: 0 times |
Joined on Nov 2010
@ india
|
#26
|
![]() |
2010-12-24
, 13:30
|
Posts: 212 |
Thanked: 66 times |
Joined on May 2010
@ India
|
#27
|
![]() |
2010-12-24
, 13:32
|
Posts: 515 |
Thanked: 266 times |
Joined on Nov 2009
@ Oelsted, Denmark
|
#28
|
As I said before, it is sudo asking for your user password, so you must have entered your user password, it was accepted then sudo is telling you you don't have permission to run /bin/su.
To fix this you need to edit your /etc/sudoers file, it is dangerous to edit this file manually because if you don't do it properly sudo will complain and stop working, instead it is advisable to edit this with the command visudo (which will verify any changes you make for correctness before saving the new file), unfortunately visudo defaults to using the "vi" editor which isn't the easiest for a noob (but I like it).
For the fix:
- Become root using the command "root"
- Run "visudo"
- Switch vi to insert mode by pressing "i"
- Add either "user ALL=(ALL) /bin/su" to enable that specific command with sudo or "user ALL=(ALL) ALL" to enable all commands with sudo, and add it to the top of the file.
- Switch vi back to command mode by pressing "Esc"
- Save and quit vi by typing ":wq"
echo "user ALL=(ALL) /bin/su" > /etc/sudoers.d/custom-user.sudoers
echo "user ALL=(ALL) ALL" > /etc/sudoers.d/custom-user.sudoers
echo "user ALL= NOPASSWD: ALL" > /etc/sudoers.d/custom-user.sudoers
![]() |
2010-12-24
, 13:35
|
Posts: 515 |
Thanked: 266 times |
Joined on Nov 2009
@ Oelsted, Denmark
|
#29
|
please tell me how to set password for root or user.I mean to say if i type sudogainroot it should ask me the password i set.I saw it on UBUNTU but unable to do so on N900.
root
passwd user
passwd root
![]() |
2010-12-24
, 13:39
|
Posts: 515 |
Thanked: 266 times |
Joined on Nov 2009
@ Oelsted, Denmark
|
#30
|
root echo "user ALL=(ALL) ALL" > /etc/sudoers.d/custom-user.sudoers update-sudoers
passwd user
apt-get remove rootsh
sudo su -
sudo <command>
The Following 3 Users Say Thank You to DrWilken For This Useful Post: | ||
If you are, then you will in trouble soon.
Suggestion: forget about everything said on this thread and just use "root" or "sudo gainroot".