Jump to content

Giving root privileges to a user account


harry000
 Share

Recommended Posts

Hi,

 

Its been three days that I have intalled Mandrake 10.1. So, I am a newbie to linux and learning it.

 

I have a problem relating root privilages. I want root privilage to my account.

 

I have read lot that you should "never" login to root. You can damage it etc.

 

But as I am learning linux and I don't realy bother to install to 100 times (if i damage it)

 

So, can anyone please tell me how to give root privilages to a user on Mandrake 10.1

 

I am tired to typng the root password again and again, more that 20 times withing a hour. So please help me.

 

I have tried going "Configure you Computer" > "System" > "User and Groups

 

and changed the permission from there as "root" (i mean changing the group to "root") but it doesnot work.

 

Also, I am able to assign any group from my account (doesn't it require any root permisions), but that is another story that it did show changed group but it does not work.

 

So, anyone know how to do it.

 

[moved from Software by spinynorman - welcome aboard :)]

Link to comment
Share on other sites

I have a problem relating root privilages. I want root privilage to my account.

Why not login as root then?

(See this if your login manager doesn't display the user root

http://www.linuxquestions.org/questions/sh...hreadid=182949)

 

The other solution is to change your UID to 0 (zero) through the user manager

or edit (as root) /etc/passwd and change the third value of your login entry.

 

- Peder

Link to comment
Share on other sites

Thanks for answering.

 

Well, I have already done it. I can login as root.

 

But the problem is, I have spent lot of time "decorating" my desktop, customizing menu and all that.

 

so, i need to set privilages of my existing account as root

 

And I don't have any secuirity issue. I am the onlu user of the computer.

Link to comment
Share on other sites

You can copy /home/yourlogin/.kde to /root (that's the root home dir) then all yor decorations will be copied, too.

 

Though if you are prepared to reinstall a 100 times, I wonder if you will be willing to "decorate" everyting again after, say, 15th .... :D

 

 

:D

 

You are right... but I have already done it 3 times.

 

So, what u suggest (and now asume that I don't want to install it 100 times).

 

Should I login as root (always) or I should stick to the normal user.

 

And I need to clear one thing, If I install something with root (doing su in the shell) then will I able to access it in normal mode, or there may be some comlications.

 

I decided to get root access because of two thing -

1. I have to give password many times.

2. "urmpi" does not work in nrmal user... when i issue urpmi command in the shell, it says command does not exists..

I thought my system don't have it, so I waisted an hour finding urpmi package on net, i didn't find anything.

i finally figure out that it will execute in su.

Link to comment
Share on other sites

hey, hary000,

I'd still stick to a "normal" user account. Its no good to hjave root as the main user.

 

If you don't want/cannot setup sudo for your user, you can just keep one root console always open.

I usually have one on one of the workspaces, and start all root applications from there (you can start also graphical ones, like mcc or konqueror).

You can put the app in background mode by using an & at the end of the command line (to make the command line available for the next application), but many apps like mcc go in the background themselves. Then you don't have to use the root password every time you need to urpmi, just once for this root console window .

Link to comment
Share on other sites

If you want to get ugly, you can edit the sudo'ers file and have a line like this, you will also need to add your user to wheel (if wheel is used in mdk)

 

 

$ su -
<root passwd>
# visudo

 

un-comment one of these line or create the line

 

# 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

 

 

Or you can get more specific and do what i do

 

# User alias specification
User_Alias YUM_FULL=justin
User_Alias YUMDL_FULL=justin
User_Alias YUMBD_FULL=justin
User_Alias MOUNT_DRIVES=justin
User_Alias UMOUNT_DRIVES=justin
User_Alias SHUT_DOWN=justin
User_Alias RE_BOOT=justin
User_Alias SELINUX_FIXFILES=justin
User_Alias SELINUX_RELABEL=justin
User_Alias SBIN_INIT=justin

# Cmnd alias specification
Cmnd_Alias YUM=/usr/bin/yum *
Cmnd_Alias YUMDL=/usr/bin/yumdownloader *
Cmnd_Alias YUMBD=/usr/bin/yum-builddep *
Cmnd_Alias MOUNT=/bin/mount /media/*
Cmnd_Alias UMOUNT=/bin/umount /media/*
Cmnd_Alias SHUTDOWN=/sbin/shutdown *
Cmnd_Alias REBOOT=/sbin/reboot
Cmnd_Alias FIXFILES=/sbin/fixfiles *
Cmnd_Alias RELABEL=/bin/touch /.autorelabel
Cmnd_Alias INIT=/sbin/init *

# User privilege specification
root    ALL=(ALL) ALL

YUM_FULL        ALL=(ALL) YUM
YUMDL_FULL      ALL=(ALL) YUMDL
YUMBD_FULL      ALL=(ALL) YUMBD
MOUNT_DRIVES    ALL=(ALL) MOUNT
UMOUNT_DRIVES    ALL=(ALL) UMOUNT
SHUT_DOWN       ALL=(ALL) SHUTDOWN
RE_BOOT         ALL=(ALL) REBOOT
SELINUX_FIXFILES        ALL=(ALL) FIXFILES
SELINUX_RELABEL         ALL=(ALL) RELABEL
SBIN_INIT               ALL=(ALL) INIT

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...