Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm wondering how to create and grant a normal user (for example, named 'sybase') with root privileges?

I found useradd, adduser, and passwd to be useful, but are there any other files to modify to get 'root'-like privileges, so that user can do installation tasks?

share|improve this question
add comment

4 Answers

Under no circumstances would anyone want to do that. This is what sudo is for, to give users the ability to run things as root. Giving a non-root user all the permissions of root is inadvisable because they would then be able to do literally anything, so if that user account was hijacked, you'd be in trouble.


Summary of above: Don't try to give the user root abilities for everything, that's not possible. Use sudo [command] to run items as superuser if you need to.

share|improve this answer
    
In production yes. In testing anything is fair-game. –  Sirex Aug 4 '11 at 14:03
9  
Still inadvisable for that very same reason... in any environment. –  Thomas W. Aug 4 '11 at 14:06
5  
similar privileges can be done with sudo. And where does it say the sybase user must have the same powers as root? Read the answer by @RoryAlsop, it covers the method of adding a user to the sybase group so they can start the server. And as I said, never give full root privileges to a non-root user. EVER –  Thomas W. Aug 4 '11 at 14:23
1  
@alwaysonnet You can't do this, the superuser is a single user (UID 0) by definition. You can give multiple names to the root user, but it'll still be the same user. @TheEvilPhoenix it's not so much ill-advised as meaningless. –  Gilles Aug 4 '11 at 19:43
4  
@Sirex In testing, you give everything the same permissions as on the production system (except that you, the tester, have all privileges). Otherwise it's not much of a test. –  Gilles Aug 4 '11 at 19:44
show 8 more comments

You don't need to create 'sybase' as a privileged user.

See http://tldp.yolinux.com/HOWTO/Sybase-ASE-HOWTO.html for examples. Useful info:

"create the sybase user group and then the sybase user as a member of it. This is an ordinary user that will be used mainly for starting the database server"

bash$ su - root
bash# groupadd sybase
bash# useradd -g sybase -d /home/sybase -c "Sybase ASE DBA account" -p Hard2Guess sybase
share|improve this answer
add comment

I understand why the question was asked. Having just come back to linux for development purposes I get frustrated having to gksu this and that. The contortions one must go through just to add a file, edit system files, etc is plain silly. I wonder why you people put up with it? In windows I just create the folder (let's say php) where I want it and work on it.

Don't get me wrong, it's great knowing the inner workings of linux and how to set up and work on a LAMP server. But I really believe there has to be a better way to create, edit and access files than having to go through a terminal to create a sudo version of gedit or nautilus. By my estimation it takes 4 times the time to do anything as compared to Windows. And, no I have never deleted an important file in Windows. Why doesn't linux trust it's users with getting things done? Worrying about important systems files should not mean creating a jailed environment which I believe is over kill by a magnitude of 100s.

share|improve this answer
3  
This answer doesn't answer the question asked. Stack Exchange isn't a forum for discussing things, it is a place to ask questions and find answers to those questions. –  Mark Booth Feb 28 '13 at 12:37
add comment

You could always use the 'wheel' group.... http://alien.slackbook.org/dokuwiki/doku.php?id=linux:admin

share|improve this answer
    
wheel generally just lets you use sudo; it doesn't magically make your account root –  Michael Mrozek Aug 7 '12 at 13:58
    
The wheel group doesn't directly grant a user root privileges. Traditionally, it allows a user to use su (and become root by typing the root password). On some systems, it allows the user to run sudo (and become root without additional credentials), but this is not very widespread. See unix.stackexchange.com/questions/4460/… –  Gilles Aug 7 '12 at 14:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.