Advertisement

Yet More Linux Questions...

Started by April 12, 2002 02:09 AM
8 comments, last by Abominus 22 years, 9 months ago
1 How can I determine the major device numbers which are in use? Is there some official numbering scheme? What if a new piece of hardware comes out? How does the driver writer know which number to be assigned? 2. How can I create custom help files and plug them into the man system (if possible)? 3. Can root not be named ''root''. Can it called something else (ie w/o having to recompile anything).
I don''t know about the first 2, but I''m pretty sure you can''t rename root without modifying the kernel.

"I will crush you with my bare hands and throw you into the wind!"

-Majin Vegeta
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/
Advertisement
gunzip a man page and open it up in a text editor. you should probobly be able to figure it out from there. (its just regular text with a bunch of page formating (commands?).
quote: Original post by Chem0sh
I don''t know about the first 2, but I''m pretty sure you can''t rename root without modifying the kernel.


The kernel knows nothing about user names.

You could eventually edit the files manually and change the user name ("root" is always UID 0). However it''s probably one of the worst things you could do on a *nix. Quite frankly, I see no valid reason to do that. If you think you''ll get added security, you''re wrong (exploits give you UID 0 privileges, no matter the name, and a regular user can read /etc/passwd and get the root account''s name). If it is for another reason, I''d strongly suggest to think again: you''ll certainly break a few things, including possible mail delivery and, in a multiuser environment, your users won''t even be able to mail you.

As for man pages, check out Troff or Groff. They can also be done with (La)TeX, or generated by tools such as doxygen and other documentation generators.

Finally, check out the "devices.txt" file in your [kernel-source]/Documentation directory. It has informations about what you''re looking for (under "DEVICE DRIVERS AUTHORS PLEASE READ THIS").

Hope this helps.

1. The documentation for the device will tell you
how to use mknod to specify the correct major
and minor device numbers.

2. You could use LaTex to write your documentation
and convert them into Groff format (which is what
the UNIX manual page format is) and shorten your
life span by about 50%. I strongly recommend
that you just do it the simple way, use
manedit http://wolfpack.twu.net/ManEdit/

3. The root user is a very widely used standard,
I wouldn't recommend changing its name. You could
in theory if you modified the kernel and a ton
of dependent code and programs. But this may take
several months for you to do this and will be
a constant maintainanace to make sure each new
bit and byte that enters your system understands
your changes.


[edited by - learfox on April 13, 2002 4:26:16 AM]
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
If you think the name ''root'' is not ''personal'' enough for you, then please remember that you should never login as root to do your day to day work, use a normal user account and su into root when necessary.

If none of our guesses are correct as to why you would want to change the name of root, then please elaborate a little on the reason
Advertisement
quote: Original post by Anonymous Poster
If you think the name ''root'' is not ''personal'' enough for you, then please remember that you should never login as root to do your day to day work, use a normal user account and su into root when necessary.

If none of our guesses are correct as to why you would want to change the name of root, then please elaborate a little on the reason


No real reason. Just wanted to know if ''root'' was hardwired
into the Linux code or not.

quote: Original post by Chem0sh
I don't know about the first 2, but I'm pretty sure you can't rename root without modifying the kernel.

"I will crush you with my bare hands and throw you into the wind!"

-Majin Vegeta


Actually, you can have a user that has root rights by setting its GID( that's the Group ID ) to 0. If you set a users UID( user id ) to 0 when you log in and to a 'whoami', it will return root.



"And that's the bottom line cause I said so!"

Cyberdrek
danielc@iquebec.com
Founder
Laval Linux

/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com
Hash Bang Slash bin Slash Bash -- #!/bin/bash

[edited by - cyberdrek on April 15, 2002 10:13:04 PM]
[Cyberdrek | ]
quote: Original post by LearFox

3. The root user is a very widely used standard,
I wouldn't recommend changing its name. You could
in theory if you modified the kernel and a ton
of dependent code and programs. But this may take
several months for you to do this and will be
a constant maintainanace to make sure each new
bit and byte that enters your system understands
your changes.


[edited by - learfox on April 13, 2002 4:26:16 AM]


That's wrong, UNICES refer to UIDs to know who a user is( ie: permissions ), if you check out the /etc/passwd file, you will see that each user and some process which need to be identified as users all have different UIDs. Which is how you are actually seen by any program that requires you to be root, it checks against UID 0.



"And that's the bottom line cause I said so!"

Cyberdrek
danielc@iquebec.com
Founder
Laval Linux

/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com
Hash Bang Slash bin Slash Bash -- #!/bin/bash

[edited by - cyberdrek on April 15, 2002 10:14:53 PM]
[Cyberdrek | ]
M''kay Cyber, change yer root user name to something
else and see how many apps begin to give you trouble.
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.

This topic is closed to new replies.

Advertisement