LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-11-2005, 01:41 PM   #1
Mr. Hill
Member
 
Registered: Feb 2005
Location: Pepperland
Distribution: Arch Wombat, FreeBSD Current, OpenBSD 3.7
Posts: 238

Rep: Reputation: 30
How can I give myself root priv's as a user?


Hello. I was really stupid and got rid of Bash because I wanted to replace it with Zsh, well I shouldn't have done that simply because now everything is screwed and I can't even login as root to reinstall it. I am using Debian Sid and I was wondering if I could alter my account to enable me to use apt-get as a user and then once it's fixed I could change it back to make it where I do not have root abilities (a bit safer that way). I can't even startx - I'm writing in Links2, please help. Thanks for any help. By the way, I actually do enjoy doing stuff in a console, I don't care about X. I'm just a bit nervous that I can't login as root and use apt-get to get bash back. I have sudo on my box but I have no idea on how to set it up, I used sudo in Fedora and it was really great. Any help would be most appreciated. One more thing - I know this is the Newbie forum and this may or may not belong here specifically but I'm in Links and everything is going crazy, I like w3m but again; no root so no apt-get. Well thanks for the help.
 
Old 06-11-2005, 01:45 PM   #2
max_sipos
Member
 
Registered: Jul 2004
Posts: 96

Rep: Reputation: 15
For what it's worth, you can't set up sudo unless you have root access .
 
Old 06-11-2005, 01:47 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
there's no nice way to do this, and i'm sure to can appreciate why it's a bad thing to be able to do if you can't be root. what you can do though is boot up linux into a single user mode, i.e. where only root exists (and next to nothing else works). just add a "1" or "single" to the boot command when you start loading up, at the lilo or grub screen. e to edit in grub, can't remember what it is for lilo offhand. then you'll quickly be dropped into a console as root.
 
Old 06-11-2005, 02:43 PM   #4
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Why did you try to 'replace' bash with zsh? You can set in /etc/passwd to use a particular shell for a certain user, or use usermod to set it.
 
Old 06-11-2005, 03:58 PM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
I'm not nearly as expert as the folks who've already addressed your problem, but couldn't you just go to a single user console with Ctrl-Alt-F1, and log in as root there?
 
Old 06-11-2005, 04:05 PM   #6
twysm
Member
 
Registered: Jun 2004
Location: Lima - Perú
Distribution: Gentoo 2007.0
Posts: 78

Rep: Reputation: 15
Quote:
Originally posted by rickh
I'm not nearly as expert as the folks who've already addressed your problem, but couldn't you just go to a single user console with Ctrl-Alt-F1, and log in as root there?
He can't even do that...
 
Old 06-11-2005, 05:32 PM   #7
IchBin
Member
 
Registered: Dec 2004
Distribution: Tinysofa Classic
Posts: 75

Rep: Reputation: 15
Cant you insert a install CD and go into rescue mode?
 
Old 06-12-2005, 03:55 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally posted by IchBin
Cant you insert a install CD and go into rescue mode?
could do, but don't need to at all. single user mode is much quicker.
 
Old 06-12-2005, 02:08 PM   #9
IchBin
Member
 
Registered: Dec 2004
Distribution: Tinysofa Classic
Posts: 75

Rep: Reputation: 15
Quote:
Originally posted by acid_kewpie
could do, but don't need to at all. single user mode is much quicker.
The reason I said that is because the guy above me said he couldn't login via single user mode.
 
Old 06-12-2005, 02:19 PM   #10
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by acid_kewpie
there's no nice way to do this, and i'm sure to can appreciate why it's a bad thing to be able to do if you can't be root. what you can do though is boot up linux into a single user mode, i.e. where only root exists (and next to nothing else works). just add a "1" or "single" to the boot command when you start loading up, at the lilo or grub screen. e to edit in grub, can't remember what it is for lilo offhand. then you'll quickly be dropped into a console as root.
Using what shell though? If he's buggered up bash, isn't it going to struggle to find a command interpreter?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can give ROOT permission to a NORMAL USER bipinkdas Linux - Software 2 06-23-2005 11:03 PM
How to give user always root privileges? SimeonV SUSE / openSUSE 18 06-23-2005 11:02 AM
give root privilleges to a user atlonyx Linux - General 9 08-02-2004 01:10 AM
Give root priviligies to an user Skululu Red Hat 7 03-06-2004 08:11 AM
User priv's on mounted hard drives harperonline Linux - Networking 3 03-11-2003 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration