You are not logged in.

#1 2007-03-06 19:49:03

pedepy
Member
Registered: 2007-02-21
Posts: 198

inittab totalled - help

hey ... wanting to get X to start at boot, I modified my inittab file to "runlevel 5". Now that worked, only when in the xdm login screen, I couldnt log in, as any kind of "root root" or guest or whatever combination of username/password I tried failed. When loggin in with runlevel "3" I would only type in "root", without even the need of a password. (I tried a password-less "root" login in xdm and that failed as well).

So with no other way to get to my files I booted my pclinuxos partition, and went to edit my arch inittab with kwrite. Changed it back to what it was, saved it, and rebooted.

When I rebooted to arch, I got errors along the lines of "invalid argument" type of stuff "line 1" etc... So I went back to find that to my horror my inittab was now only just a series of "dots" "............................................................", same file length as before, only .. just dots !! Kwrite warned me about opening a binary file ... Now, it did that to me with my menu.lst grub as well a while back and I had forgotten about it (since then I type in manually to load my kernel and initrd at the grub command line to boot)...

its probably a pclinuxos problem, or a kwrite one ... for your information if it means anything both partitions (hda5 pclinuxos and hda1 arch) are xfs .... So I can still boot up a system with pclinuxos but I can no longer go to arch .. My only solution seems to be a complete reinstall of arch .. unless theres a way I can get my hands on some kind of standard inittab .. my pclinuxos one is like twice as big as the arch one so Im a little weary of trying it out in arch (then again I have nothing to loose ...)...

Its not like I have crucial data on that partition and all but its just a bit of a pain to think I have to reinstall everything  from scratch (arch, X, my window manager) just for a silly 600 byte file ..

help, thanks.


chupocabra ... psupsuspsu psu psu

Offline

#2 2007-03-06 20:15:00

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: inittab totalled - help

Firstly, you ought to set a root password with passwd command and add a normal user with adduser command.

Secondly, if you're using grub, it's enough to pass "1", "3" or "5" at the end of kernel line to boot into a respective runlevel (eg. "kernel /boot/vmlinuz26 root=/dev/sda1 vga=773 quiet ro 3"). It's the beauty of being able to change the grub options on the fly.

You might try adding "1" there and check whether it boots and then run "pacman -S initscripts" to reinstall inittab. Or just copy that using PCLinuxOS:

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)       Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

id:3:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

c1:2345:respawn:/sbin/agetty 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
c6:2345:respawn:/sbin/agetty 38400 vc/6 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

x:5:respawn:/usr/bin/xdm -nodaemon

# End of file

Or instead of pasting, just run "cvs -z3 -d :pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-arch co -r CURRENT -d initscripts arch/build/base/initscripts/inittab".

Ah. Even with X running, you may go to a console with ctrl-alt-f[1-6]. ctrl-alt-f7 gets you back to X.

Last edited by lucke (2007-03-06 20:20:39)

Offline

#3 2007-03-06 20:32:55

pedepy
Member
Registered: 2007-02-21
Posts: 198

Re: inittab totalled - help

yeah thanks but I have no internet connection on my linux box .. Im writing this from the internet cafe down the street ... thats a big problem for me but im not gonna ponny up a hundred bucks installation fee to get a land line of any kind just to have an internet connection set up in my appartment im planning to leave this summer anyways.. so you see how Im a bit stuck on that issue for now.

Ill try to just create a new inittab using the one you have supplied, I dont see how that wouldnt work.  Thank you very much for this, and also, thanks for that tip about the runlevel option in grub. I didnt know that.

(You know what too - I kinda almost enjoy booting up manually with the grub command line now - I get to load whatever kernel, initrd and option I wanna lol ...ok its a bit of a pain but its awfully flexible when you think about it)


as for setting up my root password, I see why that is important but when you take into account what I have just said, I mean there isnt really any kind of security issue for me here ... But maybe that'll make things work for the X display manager I choose... Now, if I got things write, after I boot up into runlevel 3, and "login" by typing root, what I have to do is "passwd" and then choose a root password ?

can you explain to me while were on the subject the relevance of adding a normal user to a computer I, for all purposes, am the sole user ? I mean would I have to constantly reboot to root whenever Id wanna do something more than launch an application or play a game or whatever ? Thats what kinda bugs me and why I have always logged in as root, cause I dont wanna have any restrictions on my own machine. Thats no network machine, hell, it doesnt even have an internet connection .. (i usually use auto login too)
Hey then again maybe you can tell me why I should create a normal user. (I am very new to linux, last time I had used a computer this much was back in the days of windows 98)

cheers!

Last edited by pedepy (2007-03-06 20:38:07)


chupocabra ... psupsuspsu psu psu

Offline

#4 2007-03-07 16:47:36

cphase
Member
From: Newnan. GA
Registered: 2006-11-06
Posts: 116
Website

Re: inittab totalled - help

You dont have to reboot to do anything as root, use sudo. Not being root all the time keeps you from accidently doing anything you may regret, such as editing a file. If you dont want to use sudo you can always use the  su command.


Power to the Penguin

http://counter.li.org/ #386007

Offline

#5 2007-03-07 19:33:50

pedepy
Member
Registered: 2007-02-21
Posts: 198

Re: inittab totalled - help

ok im back. Ok, two things, first off, the inittab you gave me doesnt do it .. im still getting the same error - its different of course but its the same type of error ... "missing argument" type of thing .. shouldve written it down .. anyway, it doesnt work .. sad

Second, could you explain how the sudo or su or whatever command is/works/what does it do ?

thanks smile


chupocabra ... psupsuspsu psu psu

Offline

#6 2007-03-07 21:21:47

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: inittab totalled - help

'su' or switch user allows you to temporarily switch to another username

For example, when in a terminal, and you want to create a file as root, you can do:

$ su root
$ nano -w /etc/inittab
<do some editing>
$ exit

One thing to note, if you just type 'su' without a username, it defaults to root.

Now 'sudo' is very similar, it lets you run individual commands as root.  So you could do something like this as a normal user:

$ sudo vim /etc/inittab
<do some editing

See this wiki page for more info -> http://wiki.archlinux.org/index.php/Sudo

Hope this helps, and make sure your inittab is exactly like what luke wrote.  If it still dosn't work please post a more detailed error message.

Last edited by tom5760 (2007-03-07 21:22:05)

Offline

#7 2007-03-08 02:56:44

pedepy
Member
Registered: 2007-02-21
Posts: 198

Re: inittab totalled - help

well ... i have reinstalled from scratch anyhow ..

pardon my ignorance, but doesnt "su" and "sudo" somehow defeat the purpose of root itself ? .... i mean, what if you go into someone's machine and log into a guest account, doesnt that mean you could completely toy around that guy's system just if you knew the sudo command ?


chupocabra ... psupsuspsu psu psu

Offline

#8 2007-03-08 03:03:27

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: inittab totalled - help

with sudo, you have to be pre-authorized in the sudoer's file in order to gain any priviledges (root or otherwise), and with su you'll need executable rights to the binary and also you'll need to know the actual root password.  Each command has it's place in the world and is best used for different purposes.

Offline

#9 2007-03-08 08:38:26

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: inittab totalled - help

pedepy wrote:

well ... i have reinstalled from scratch anyhow ..

pardon my ignorance, but doesnt "su" and "sudo" somehow defeat the purpose of root itself ? .... i mean, what if you go into someone's machine and log into a guest account, doesnt that mean you could completely toy around that guy's system just if you knew the sudo command ?

The idea is that you should never log into a box as root, only as a regular user, and then escalate your privs to root level.  Whether this is always practical is open to debate, but it's fairly well accepted that running things as root 100% of the time poses a much greater risk to your install and your data than running things as a user.  Other than restoring from backups, there's really no way to recover from an rm typed by mistake.  Of course, you can get around some of these threats by aliasing cp, mv and rm to cp -i, mv -i, and rm -i.  Still, it's generally considered less safe to run as root.


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

Board footer

Powered by FluxBB