Results 1 to 10 of 11
Hi,
Is the user name "root" constant? I mean can we change the user name for the root user ( having user id 0) to something else and it can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-19-2005 #1Just Joined!
- Join Date
- Jul 2005
- Posts
- 6
User name of the system admin
Hi,
Is the user name "root" constant? I mean can we change the user name for the root user ( having user id 0) to something else and it can still have the root privilage?
Similarly is it possible to add a new user and give him/her all the privilages the root has?
Thanks in advance for your help/suggestions.
Basu.
- 07-19-2005 #2Linux Engineer
- Join Date
- Apr 2005
- Location
- Belgium
- Posts
- 1,429
I doubt it. Then you would have to change quite a lot. What you could do is give yourself total root privileges, that's a bit the same, but then you better stick with Windows
** Registered Linux User # 393717 and proud of it
** Check out www.zenwalk.org
** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **
- 07-19-2005 #3
Re: User name of the system admin
Interesting question, but I don't know of anyone that's actually tried it. It would more than likely be an awful lot of work for very little gain.
Originally Posted by basudevagrawal
Yes, this is possible however I question why it is that you want to do this? Root user is designed to be used only for system administration tasks, not everyday activities. It's a security issue. Making a regular user have all the privileges of root can be dangerous, even for a seasoned Linux user. When you have root permissions, the system assumes you know what you're doing. You could very well accidentally delete your entire operating system with one command.Similarly is it possible to add a new user and give him/her all the privilages the root has?Registered Linux user #270181
TechieMoe's Tech Rants
- 07-19-2005 #4Possibly. But why?I mean can we change the user name for the root user ( having user id 0) to something else and it can still have the root privilage?
- 07-20-2005 #5Just Joined!
- Join Date
- Jul 2005
- Posts
- 6
Hi,
Thanks for your replies.
What I need to do is find out in a C program, if the current user is just an ordinary user or is a system administrator(having privilages same as "root"). The obvious thing to do will be to check if the user name is "root".
However if there is an possiblity of an user having a user name other than "root" being a system administrator, then I have to take that into consideration as well.
So how do I identify whether the current user is a system administrator or not?
Thanks in advance for your thoughts/suggestions.
Basu.
- 07-23-2005 #6Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
It's user ID 0 that's special, not the name atrributed to it. You can also have more than one entry in /etc/passwd with a user ID of zero - for instance I make my shutdown user have an ID of 0.
- 07-23-2005 #7Linux User
- Join Date
- Jul 2005
- Posts
- 369
i renamed the root user then created a fake "root" user with no privliges...just to confuse people
- 07-23-2005 #8Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
I intended doing this myself actually bt never have. What's the best way to do it? It is standard procedure in Windows admin to change the name of the administrator account ASAP, although better to do it during installation.
- 07-24-2005 #9Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
Yes, but Linux security is designed in, whereas in Windoze it was added a very inadequate afterthought, which is why you need admin privileges to run user programs. With Linux, you protect the root account with a sensible password, and rarely have to use it for user apps, since you can tweak the privileges appropriately on a per-user basis. If you think you need to change root's name, you're going against 30 plus years of UNIX admin experience. As I've posted in another thread, don't cripple Linux just to make it as poor as Windoze.
Originally Posted by bigtomrodney
- 07-25-2005 #10Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
I certainly wouldn't try to! The reason I've asked isn't for fun, but as a dummy for any cracker wannabes. For instance I was thinking of creating a fake root and using chroot and some other bits creating a cage to see what a would be attacker would do. I have had a lot of brute force attacks, or attempts I should say through ssh, and I would like to know what goes on in the successful ones.


Reply With Quote
