![]() |
sudoers file configured, now passwd???
Hi,
i was trying to create a desktop icon for a convinient reboot... did the .desktop file and stuff.. however clicking the icon always stopped to ask password for sudo reboot... so i browsed a solution and got to add to etc/sudoers user ALL=(ALL) ALL or root ALL=(ALL) ALL (cant remember now which) thinking this would give "user" all sudo priviledges. Well, the outcome is that now i cant sudo gainroot anymore without password, and i dont know the password, i dont remember i never changed it???? is there a default passwd i could try...? typing root or sudo gainroot both require passwd that i dont have/know... and of course i cant go fix the sudoers file without root access... i had an idea to reinstall rootsh, but now even the GUI-ApplicationManager dont work, says unable to something... damn :mad::mad::mad: please help, the phone was almost perfect adjusted, and now i screwed it :mad: help is GREATLY APPRECIATED |
Re: sudoers file configured, now passwd???
Do you have open-ssh installed to get root access via ssh command from a linux box or winscp application from within windows?
|
Re: sudoers file configured, now passwd???
From man sudo:
sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file. The real and effective uid and gid are set to match those of the target user as specified in the passwd file and the group vector is initialized based on the group file (unless the -P option was specified). If the invoking user is root or if the target user is the same as the invoking user, no pass‐ word is required. Otherwise, sudo requires that users authenticate themselves with a password by default (NOTE: in the default configura‐ tion this is the user’s password, not the root password). Once a user has been authenticated, a timestamp is updated and the user may then use sudo without a password for a short period of time (15 minutes unless overridden in sudoers). From man sudoers: NOPASSWD and PASSWD By default, sudo requires that a user authenticate him or herself before running a command. This behavior can be modified via the NOPASSWD tag. Like a Runas_Spec, the NOPASSWD tag sets a default for the commands that follow it in the Cmnd_Spec_List. Conversely, the PASSWD tag can be used to reverse things. For example: ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm would allow the user ray to run /bin/kill, /bin/ls, and /usr/bin/lprm as root on the machine rushmore as root without authenticating himself. If we only want ray to be able to run /bin/kill without a password the entry would be: ray rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls, /usr/bin/lprm Note, however, that the PASSWD tag has no effect on users who are in the group specified by the exempt_group option. By default, if the NOPASSWD tag is applied to any of the entries for a user on the current host, he or she will be able to run sudo -l without a password. Additionally, a user may only run sudo -v without a pass‐ word if the NOPASSWD tag is present for all a user’s entries that per‐ tain to the current host. This behavior may be overridden via the ver‐ ifypw and listpw options. |
Re: sudoers file configured, now passwd???
thanks for replies.
no i dont have ssh installed, and i cant install it now. it it obvious now i was playing more superuser than i am able to... and too quick decicions to configure.... now that i read more info on the sudoers file they say on maemo, do not touch the file :( as mentioned, i cant get to root anymore. and, i think, since the system wants passwd for most root operations now, i cant apt-get and my application manager does not show any applications and dont let me add any. so i cant reinstall rootsh, can i? is the required password some predefined default or random? is there any backdoor now i could try to get the sudoers file reconfigured?:confused: i am about to accept the fact that i will need to flash the device... any good articles to follow? where can i find the latest OS release? thank you here is the sudo -l output, the last line is the troublemaker now, i think User user may run the following commands on this host: (root) NOPASSWD: /usr/sbin/gainroot (root) NOPASSWD: /usr/sbin/mmc-mount /dev/mmcblk0 /media/mmc1 (root) NOPASSWD: /usr/sbin/mmc-mount /dev/mmcblk0p1 /media/mmc1 (root) NOPASSWD: /bin/umount /media/mmc1 (root) NOPASSWD: /bin/umount -l /media/mmc1 (root) NOPASSWD: /usr/sbin/osso-usb-mass-storage-enable.sh (root) NOPASSWD: /usr/sbin/osso-usb-mass-storage-disable.sh (root) NOPASSWD: /sbin/mkdosfs /dev/mmcblk0* (root) NOPASSWD: /usr/sbin/mmc-rename /dev/mmcblk0* (root) NOPASSWD: /etc/init.d/af-base-apps stop (root) NOPASSWD: /etc/osso-af-init/gconf-daemon.sh stop (root) NOPASSWD: /etc/init.d/af-base-apps start (root) NOPASSWD: /etc/osso-af-init/gconf-daemon.sh start (root) NOPASSWD: /etc/init.d/osso-systemui restart (root) NOPASSWD: /usr/sbin/gconf-clean.sh (root) NOPASSWD: /usr/sbin/chroot /mnt/initfs /usr/bin/retutime * (root) NOPASSWD: /sbin/insmod /mnt/initfs/lib/modules/current/g_file_storage.ko stall=0 file=/dev/mmcblk0 (root) NOPASSWD: /sbin/insmod /mnt/initfs/lib/modules/current/g_ether.ko (root) NOPASSWD: /sbin/rmmod g_file_storage (root) NOPASSWD: /sbin/rmmod g_ether (root) NOPASSWD: /usr/sbin/osso-backup-restore-locale (install) NOPASSWD: /usr/bin/app-installer-tool (root) NOPASSWD: /opt/fmms/fmms_magic (root) NOPASSWD: /usr/libexec/apt-worker (root) NOPASSWD: /usr/bin/hildon-application-manager-util restore-catalogues (root) NOPASSWD: /usr/bin/hildon-application-manager-util restore-catalogues2 (root) NOPASSWD: /usr/bin/hildon-application-manager-util clear-user-catalogues (root) NOPASSWD: /usr/bin/personalisation (root) NOPASSWD: /usr/bin/hildon-input-method-configurator.bin (root) NOPASSWD: /bin/touch /etc/hildon-input-method.configured (root) NOPASSWD: /bin/rm /etc/hildon-input-method.configured (root) NOPASSWD: /usr/sbin/kernel-power-deinstall (root) NOPASSWD: /usr/sbin/kernel-config * (root) NOPASSWD: /usr/bin/mafw.sh (root) NOPASSWD: /usr/bin/mafw.sh (root) NOPASSWD: /usr/sbin/mobilehotspot_backend (root) NOPASSWD: /etc/init.d/ke-recv start (root) NOPASSWD: /etc/init.d/ke-recv stop (root) NOPASSWD: /etc/init.d/alarmd start (root) NOPASSWD: /etc/init.d/alarmd stop (root) NOPASSWD: /etc/init.d/osso-hss start (root) NOPASSWD: /etc/init.d/osso-hss stop (root) NOPASSWD: /usr/bin/osso-product-info (root) NOPASSWD: /bin/mv -f /tmp/.opi.tmp.tmp /tmp/.opi.tmp (root) NOPASSWD: /bin/umount /media/mmc2 (root) NOPASSWD: /usr/sbin/osso-prepare-partition.sh * (root) NOPASSWD: /sbin/mkdosfs * (root) NOPASSWD: /etc/init.d/ke-recv stop (root) NOPASSWD: /etc/init.d/hildon-desktop stop (root) NOPASSWD: /etc/init.d/mediaplayer-daemon stop (root) NOPASSWD: /etc/init.d/metalayer-crawler0 stop (root) NOPASSWD: /etc/init.d/icd2 stop (root) NOPASSWD: /usr/bin/killall gconfd-2 (root) NOPASSWD: /bin/mv -f /var/tmp/.locale.new /etc/osso-af-init/locale (root) NOPASSWD: /bin/chmod 0755 /etc/osso-af-init/locale (root) NOPASSWD: /bin/chown 0.0 /etc/osso-af-init/locale (root) NOPASSWD: /sbin/initctl stop sscd (root) NOPASSWD: /bin/touch /var/run/pin-query-done (root) NOPASSWD: /opt/swappolube/updateTuning * (root) NOPASSWD: /usr/bin/tscalibrate (root) NOPASSWD: /etc/osso-backup/restore.d/always/bluez-restore.sh (ALL) ALL |
Re: sudoers file configured, now passwd???
just for future reference: you should never edit the sudoers file without using visudo. ever. it locks you out of root iirc if you screw something up, and apparently you have
|
Re: sudoers file configured, now passwd???
yep. now i know :o
just reading instructions to reflash... edit: the flash was easy to to, less than ½h for the 1st time, and a couple of hours later i have the phone good as before... and i am a bit wiser after all, lol :D well all this is what makes this device interesting... |
All times are GMT. The time now is 02:20. |
vBulletin® Version 3.8.8