You are not logged in.

#26 2006-06-23 14:13:28

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How remove root and user passwords?

Alright... First of all, the comments don't matter, because the computer simply ignores them. Anything with a # or a ! before it in rc.conf, the interpreter will simply not load.

And people say: that is simple is geniuos.
So were difficult is not true.

It's "simple" because Arch is literally not as complicated as other distros. Look at /etc/ for example - the config file for boot and network stuff is rc.conf, /etc/rc.d/ contains only scripts to start and stop daemons (as opposed to directories for runlevels, start and stop scripts, and miscellaneous config files). It makes things easier for people who know their way around Arch Linux; if you keep using the distro, you'll probably also come to appreciate the way it's layed out.

I make, that say in this link:
http://wiki.archlinux.org/index.php/Dis … o_password
And now can not login.
How add password to root or user, I have instaled other linux, so can edit files?

You mean you can't log in as root? Do you have another account?

(To give an account a password you do 'passwd accountname'. In this case, if you have another account available, you'll want to do 'sudo passwd accountname, because you can't use passwd without certain superuser priveleges.)

Offline

#27 2006-06-23 14:38:04

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How remove root and user passwords?

Thanks!

Gullible Jones wrote:

Alright... First of all, the comments don't matter, because the computer simply ignores them. Anything with a # or a ! before it in rc.conf, the interpreter will simply not load.

But first computer load file with comments and then read not commented words.
For example text editor open slower text files with coments, text files without comments open faster. And computer text files with comments open slower.
I only have root and user acount.
Root password deleted and user password deleted.
After write acount ask for password.
I think need some files edit to add password to user, I can it edit with Partition Magik 8.


Goodbye!

Offline

#28 2006-06-23 15:05:32

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How remove root and user passwords?

alikas wrote:

Thanks!

Gullible Jones wrote:

Alright... First of all, the comments don't matter, because the computer simply ignores them. Anything with a # or a ! before it in rc.conf, the interpreter will simply not load.

But first computer load file with comments and then read not commented words.

As I said, anything in front of a # it ignores. I'm guessing that the comments are not even loaded into memory. Also, remember the actual amount of space the comments eat up... It's very, very small. With comments or without, each of the initscripts probably only takes up a single logical block. (Or shares a single logical block if you're using ReiserFS with tail-packing.)

For example text editor open slower text files with coments, text files without comments open faster. And computer text files with comments open slower.

That should only matter if you're using a 386 or something.

I only have root and user acount.
Root password deleted and user password deleted.

Deleted? How? Do you mean you didn't give the user account a password before locking the root account, or that you accidentally locked it too?

After write acount ask for password.
I think need some files edit to add password to user, I can it edit with Partition Magik 8.

Some distros have a useradd utility that asks for a password, Arch doesn't as far as I know, unless it's in one of the repos.

(Partition Magic won't help you with this, methinks, it is after all for messing with partitions.)

Offline

#29 2006-06-23 15:26:04

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: How remove root and user passwords?

Just a quick correction:

Gullible Jones wrote:

As I said, anything in front of a # it ignores. I'm guessing that the comments are not even loaded into memory.

They are most definitely loaded into memory - before bash can ignore comments, it needs to know the comments are there.
To know the comments are there, it needs to read the file data into memory.  It will see the leading #, but then it must read every character after the # until it finds a newline character.  There's no magic there - bash will read every character of a comment, even though it's ignored in the end.

Offline

#30 2006-06-23 16:36:31

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How remove root and user passwords?

Thanks,
Very small plus very small and get big.
If be one file with comment and not compiled code, then not so be not good, but if this files thousand?

Yes, I delete root and user paswords.

Sudoers my file:

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel    ALL=(ALL)    ALL

# Same thing without a password
# %wheel    ALL=(ALL)    NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

I uncomment now ' %wheel    ALL=(ALL)    NOPASSWD: ALL' and then login as user do not ask for password.
How add for root password?


Goodbye!

Offline

#31 2006-06-23 20:22:13

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How remove root and user passwords?

Cerebral wrote:

Just a quick correction:

Gullible Jones wrote:

As I said, anything in front of a # it ignores. I'm guessing that the comments are not even loaded into memory.

They are most definitely loaded into memory - before bash can ignore comments, it needs to know the comments are there.
To know the comments are there, it needs to read the file data into memory.  It will see the leading #, but then it must read every character after the # until it finds a newline character.  There's no magic there - bash will read every character of a comment, even though it's ignored in the end.

Right, thanks. 8)

Offline

#32 2006-06-23 20:32:48

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How remove root and user passwords?

alikas wrote:

Thanks,
Very small plus very small and get big.
If be one file with comment and not compiled code, then not so be not good, but if this files thousand?

But there aren't a thousand heavily commented initscripts. And even if all the initscripts on a typical Arch system were commented as heavily as rc.conf, it wouldn't matter - plain text files are small and modern computers are fast.

Yes, I delete root and user paswords.

Ouch. By accident I assume?

Sudoers my file:

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel    ALL=(ALL)    ALL

# Same thing without a password
# %wheel    ALL=(ALL)    NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

I uncomment now ' %wheel    ALL=(ALL)    NOPASSWD: ALL' and then login as user do not ask for password.
How add for root password?

You wouldn't want to if you're going to lock the root account... In order to have your user account working again, you'll have to boot up using your install CD, mount you Arch Linux root partition, chroot into it ('chroot mount_directory /bin/bash', where mount_directory is wherever you mounted the partition), and run 'passwd username' as you would if you were normally adding or changing a password.

Offline

#33 2006-06-24 03:56:08

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How remove root and user passwords?

Thanks!
I removed rood password like say in this instruction:
http://wiki.archlinux.org/index.php/Dis … o_password
2.4 Test it, then disable the root account by removing it's password.
      passwd -l root
Thanks!
May can give example, that can be mount_directory?


Goodbye!

Offline

#34 2006-06-24 16:32:52

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How remove root and user passwords?

Anywhere you mount the system's root partition. /mnt, for example... Could be any directory though.

Offline

#35 2006-06-24 16:42:04

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How remove root and user passwords?

Thanks.


Goodbye!

Offline

Board footer

Powered by FluxBB