Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Sudo makes me feel stupid some times...
New Posts  All Forums:Forum Nav:

Sudo makes me feel stupid some times...

post #1 of 43
Thread Starter 
So about a week ago i needed to get a root session in a terminal so i could kill x and drop to a cmd line and install my nvidia drivers in crunchbang... being a debian based distro, the root account has a random password lol

i went about getting access to my root account beyond just sudo by doing a "sudo passwd root" works quite well and now i can su and type in my root password i set up...

and i did that... because it never even occurred to me even once that i could just "sudo su" and only use my user password, until today -.-

1 week latency in that facepalm lol
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #2 of 43
sudo -s also works.

sudo also has an insult mode, which will question your intelligence if you enter a password in wrong.
Daedalus
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 955 Gigabyte MA78GM-UD2H Gainward 9600GT GS 4GB OCZ Platinum PC2-6400 
Hard DriveOSMonitorKeyboard
250GB Samsung P120S, 1TB Samsung F1 Window 7 64bit/Arch Linux Samsung 204B 20"/Dell 1701FP IBM Model F and others 
PowerCaseMouse
Corsair HX620 Lian-Li V350B Steelseries Ikari Laser 
  hide details  
Reply
Daedalus
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 955 Gigabyte MA78GM-UD2H Gainward 9600GT GS 4GB OCZ Platinum PC2-6400 
Hard DriveOSMonitorKeyboard
250GB Samsung P120S, 1TB Samsung F1 Window 7 64bit/Arch Linux Samsung 204B 20"/Dell 1701FP IBM Model F and others 
PowerCaseMouse
Corsair HX620 Lian-Li V350B Steelseries Ikari Laser 
  hide details  
Reply
post #3 of 43
Thread Starter 
Quote:
Originally Posted by ch_123 View Post
sudo -s also works.

sudo also has an insult mode, which will question your intelligence if you enter a password in wrong.
lol also does it if you dont have sudo rights on the account and try to sudo something see it all the time in fedora cause it doesnt set up your user account as a sudo account by default and im too lazy to do it manually but keep forgetting...

the last line is somethin like "with great power comes great responsibility"
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #4 of 43
Quote:
Originally Posted by EntTheGod View Post
So about a week ago i needed to get a root session in a terminal so i could kill x and drop to a cmd line and install my nvidia drivers in crunchbang... being a debian based distro, the root account has a random password lol

i went about getting access to my root account beyond just sudo by doing a "sudo passwd root" works quite well and now i can su and type in my root password i set up...

and i did that... because it never even occurred to me even once that i could just "sudo su" and only use my user password, until today -.-

1 week latency in that facepalm lol

Don't worry bro

i have no idea what you're talking about
Dorianime
(15 items)
 
School Rig
(5 items)
 
 
MotherboardGraphicsRAMHard Drive
Clevo W120HNM/w170HN GT540M Samsung Seagate Momentus 
OS
Windows 7 ultimate 
  hide details  
Reply
Dorianime
(15 items)
 
School Rig
(5 items)
 
 
MotherboardGraphicsRAMHard Drive
Clevo W120HNM/w170HN GT540M Samsung Seagate Momentus 
OS
Windows 7 ultimate 
  hide details  
Reply
post #5 of 43
Quote:
Originally Posted by EntTheGod View Post
lol also does it if you dont have sudo rights on the account and try to sudo something see it all the time in fedora cause it doesnt set up your user account as a sudo account by default and im too lazy to do it manually but keep forgetting...

the last line is somethin like "with great power comes great responsibility"
More like this (Where I enter the wrong password or leave it blank) -

Code:
user@host:~$ sudo -s
[sudo] password for user: 
You gotta go owwwww!
[sudo] password for user: 
I think ... err ... I think ... I think I'll go home
[sudo] password for user: 
No soap, honkie-lips.
sudo: 3 incorrect password attempts
user@host:~$ sudo -s
[sudo] password for user: 
You type like I drive.
[sudo] password for user: 
Your mind just hasn't been the same since the electro-shock, has it?
[sudo] password for user: 
I can't hear you -- I'm using the scrambler.
sudo: 3 incorrect password attempts
user@host:~$ sudo -s
[sudo] password for user: 
Have you considered trying to match wits with a rutabaga?
[sudo] password for user: 
Sorry about this, I know it's a bit silly.
[sudo] password for user: 
I feel much better now.
sudo: 3 incorrect password attempts
user@host:~$ sudo -s
[sudo] password for user: 
We'll all be murdered in our beds!
[sudo] password for user: 
I don't wish to know that.
[sudo] password for user: 
You can't get the wood, you know.
sudo: 3 incorrect password attempts
user@host:~$ sudo -s
[sudo] password for user: 
Hold it up to the light --- not a brain in sight!
[sudo] password for user: 
There's a lot of it about, you know.
[sudo] password for user: 
Harm can come to a young lad like that!
sudo: 3 incorrect password attempts
user@host:~$ sudo -s
[sudo] password for user: 
I have been called worse.
[sudo] password for user: 
Wrong!  You cheating scum!
[sudo] password for user: 
Where did you learn to type?
sudo: 3 incorrect password attempts
And so on
Daedalus
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 955 Gigabyte MA78GM-UD2H Gainward 9600GT GS 4GB OCZ Platinum PC2-6400 
Hard DriveOSMonitorKeyboard
250GB Samsung P120S, 1TB Samsung F1 Window 7 64bit/Arch Linux Samsung 204B 20"/Dell 1701FP IBM Model F and others 
PowerCaseMouse
Corsair HX620 Lian-Li V350B Steelseries Ikari Laser 
  hide details  
Reply
Daedalus
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 955 Gigabyte MA78GM-UD2H Gainward 9600GT GS 4GB OCZ Platinum PC2-6400 
Hard DriveOSMonitorKeyboard
250GB Samsung P120S, 1TB Samsung F1 Window 7 64bit/Arch Linux Samsung 204B 20"/Dell 1701FP IBM Model F and others 
PowerCaseMouse
Corsair HX620 Lian-Li V350B Steelseries Ikari Laser 
  hide details  
Reply
post #6 of 43
I never understood sudo that asks for your own user password..why? It doesn't make sense to me..

I always set sudo to ask for target password.
post #7 of 43
Thread Starter 
lol never seen that before XD
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #8 of 43
Quote:
Originally Posted by EntTheGod View Post
lol also does it if you dont have sudo rights on the account and try to sudo something see it all the time in fedora cause it doesnt set up your user account as a sudo account by default and im too lazy to do it manually but keep forgetting...

the last line is somethin like "with great power comes great responsibility"
you can use "su" instead
but you need the root password
the user password will not work for it
OoGhiJ MIQtxxXA
(13 items)
 
  
CPUMotherboardGraphicsRAM
q9550 E0 @3.825ghz Abit IX48-GT3 Tigerforce SPARKLE GTX470 850c/1800m 220 650c sli later 4GB DDR3 Mushkin blackline 7-8-7-24-1T 1200mhz 
Hard DriveOptical DriveOSMonitor
WD1tb +WD500gb +WD200gb not like I need one edge linux LG 22" w2240 +optiquest q71 
KeyboardPowerCaseMouse
Adesso MKB-135B Mechanical DELTA GPS-750B A 750w sleeved moded Kandalf LCS Razer Mamba 
Mouse Pad
don't got one or need one 
  hide details  
Reply
OoGhiJ MIQtxxXA
(13 items)
 
  
CPUMotherboardGraphicsRAM
q9550 E0 @3.825ghz Abit IX48-GT3 Tigerforce SPARKLE GTX470 850c/1800m 220 650c sli later 4GB DDR3 Mushkin blackline 7-8-7-24-1T 1200mhz 
Hard DriveOptical DriveOSMonitor
WD1tb +WD500gb +WD200gb not like I need one edge linux LG 22" w2240 +optiquest q71 
KeyboardPowerCaseMouse
Adesso MKB-135B Mechanical DELTA GPS-750B A 750w sleeved moded Kandalf LCS Razer Mamba 
Mouse Pad
don't got one or need one 
  hide details  
Reply
post #9 of 43
Thread Starter 
Quote:
Originally Posted by 3dfxvoodoo View Post
you can use "su" instead
but you need the root password
the user password will not work for it
thats what i usually do... hence why i did the "sudo passwd root" to change the root password to something i could use instead of leaving it at the default random that debian based distros do

BUT sudo su is just so much easier in retrospect, su you need root password, so now you need to remember two different passwords to administer your system, your own sudo password and your root password.... sudo su just uses your sudo password, so anything and everything you do will use just that one password while keeping your root account a little more secure
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #10 of 43
Quote:
Originally Posted by evermooingcow View Post
I never understood sudo that asks for your own user password..why? It doesn't make sense to me..

I always set sudo to ask for target password.
A few reasons -

1) Prevents someone getting root access on your machine if you happen to leave it unlocked.
2) Forces you to think about what is going on. With the Windows UAC, it's very simple to just keep click "Yeah, please go away" without thinking about what is causing that window to come up.

Quote:
you can use "su" instead
Some distros lock down su by default, such as Ubuntu (I think OS X does it too). The advantage of sudo is that you cut down on situations where you forget you are logged in as root, and then do something really bad thinking that you were logged as a regular user. Of course, if you use sudo su, this is negated.
Daedalus
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 955 Gigabyte MA78GM-UD2H Gainward 9600GT GS 4GB OCZ Platinum PC2-6400 
Hard DriveOSMonitorKeyboard
250GB Samsung P120S, 1TB Samsung F1 Window 7 64bit/Arch Linux Samsung 204B 20"/Dell 1701FP IBM Model F and others 
PowerCaseMouse
Corsair HX620 Lian-Li V350B Steelseries Ikari Laser 
  hide details  
Reply
Daedalus
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 955 Gigabyte MA78GM-UD2H Gainward 9600GT GS 4GB OCZ Platinum PC2-6400 
Hard DriveOSMonitorKeyboard
250GB Samsung P120S, 1TB Samsung F1 Window 7 64bit/Arch Linux Samsung 204B 20"/Dell 1701FP IBM Model F and others 
PowerCaseMouse
Corsair HX620 Lian-Li V350B Steelseries Ikari Laser 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Sudo makes me feel stupid some times...