DIGIT-ARC read-only archive · snapshot: July 23, 2026

smart removed sudo!!!! HELP!!!!! HELP!!!! HELP!!!!! HELP!!!!!!!

7 posts · originally from https://geek.digit.in/community/threads/smart-removed-sudo-help-help-help-help.64465/

nileshgr
nileshgr Original post #1
Aug 1, 2007 at 10:34 PM
This nonsense smart removed sudo while i was removing vim. I am not able to use apt, yum, smart now. What do i do? Even rpm doesn't work to install sudo. I tried compiling the source using make, it also gives error. Now i shud shutdown my pc or not???? Please answer as fast as possible!!!!! :( :( :( :( :( :cry: :cry: :cry:
Pathik
Pathik #2
Aug 1, 2007 at 10:41 PM
doesnt even SU work??
praka123
Aug 2, 2007 at 2:07 AM
go to the rpm cache directory(somewhere /var/cache/archives contains ur .rpms) as "su"(i hope it works!) in terminal.there u manually install vim,sudo etc.each time there will be error saying some missing dependency,u have to manually resolve to get the system back.sorry rpm way is tough :(
M
Aug 2, 2007 at 11:34 AM
And don't reinstall if that doesn't work. It can be easily solved by booting into single user mode and installing sudo then editing /etc/sudoers file using visudo, if needed.
nileshgr
Aug 2, 2007 at 9:46 PM
su works.

@praka, there is no dir like archives in ./var/cache.

For now, i fixed it by chmodding /var/cache and /yum_cache (my yum cache) to 777. Does this pose some security threat?
praka123
Aug 2, 2007 at 10:07 PM
yeah its for ubuntu/debian deb cache dir.for rpms,i dont exactly know where yum stores.
^only /tmp remains 777,all other dirs in ur root "/" shud be 755 .just open a terminal and try "cd /" and "ll" or "ls -l" will give u the position.
nileshgr
Aug 5, 2007 at 9:58 PM
praka123 said:
yeah its for ubuntu/debian deb cache dir.for rpms,i dont exactly know where yum stores.
^only /tmp remains 777,all other dirs in ur root "/" shud be 755 .just open a terminal and try "cd /" and "ll" or "ls -l" will give u the position.
The output of ll in / is:

Code:
drwxr-xr-x   2 root          root        4096 Aug  4 21:50 bin
drwxr-xr-x   4 root          root        1024 Jul 22 08:48 boot
drwxr-xr-x  11 root          root        4280 Aug  5 17:52 dev
dr-xr-xr-x   1 root          root        2048 Sep 27  2001 dvd
drwxr-xr-x 103 root          root       12288 Aug  5 21:08 etc
drwxr-xr-x   5 root          root        4096 Aug  5 15:18 home
drwxr-xr-x  13 root          root        4096 Aug  5 21:05 lib
drwx------   2 root          root       16384 Jul 19 04:38 lost+found
drwxr-xr-x   2 root          root        4096 Aug  5 17:52 media
drwxr-xr-x   2 root          root           0 Aug  5 17:51 misc
drwxr-xr-x   2 root          root        4096 Oct 11  2006 mnt
drwxr-xr-x   2 root          root           0 Aug  5 17:51 net
drwxr-xr-x   2 root          root        4096 Oct 11  2006 opt
dr-xr-xr-x 154 root          root           0 Aug  5  2007 proc
drwxr-x---  36 root          root        4096 Aug  5 21:36 root
drwxr-xr-x   2 root          root       12288 Aug  4 21:50 sbin
drwxr-xr-x   4 root          root           0 Aug  5  2007 selinux
drwxr-xr-x   2 root          root        4096 Oct 11  2006 srv
drwxr-xr-x  11 root          root           0 Aug  5  2007 sys
drwxrwxrwx  24 root          root        4096 Aug  5 21:45 tmp
drwxr-xr-x  14 root          root        4096 Jul 19 04:46 usr
drwxr-xr-x  24 root          root        4096 Jul 31 22:27 var
drwxrwxrwx   7 root          root        4096 Aug  1 20:04 yum_cache
I didn't change the perms for any of them except yum_cache. Also after chmodding those dirs, yum works.

EDIT: I changed the perms of those dirs to 755. sudo is absent. yum works. will post if any problem occurs.