redhat 9.0 isn't finding the
$ groupadd
or
$ useradd commands
I'm trying to instal MySQL
Printable View
redhat 9.0 isn't finding the
$ groupadd
or
$ useradd commands
I'm trying to instal MySQL
check path, and make sure that you are root.
Those commands need root permission. su -
Edit: People keep posting 2-3 mins before me :(
The '$' prompt would indicate you are attempting these system administration commands as user and not as root.
You need to be root or equivalent in order to perform most the the Linux/Unix system administration functions.
su -
<root password>
groupadd
or
useradd
Type 'exit' to exit from 'su -' when done.
It's not normally in the path for ordinary users. You can find the system binaries in /sbin or /usr/sbin. A simple $ locate groupadd or $ find / -name groupadd would do the trick. Also you can view the man page. On some distros that will show you where to find the file.
Like the above people said, you need root privilages to run the command, but you don't necessarily need su root. You could do it by executing sudo, for example.
I don't know if that would work. He would still need permission to write to /etc/passwd. I might be wrong.Quote:
Originally posted by chort
you don't necessarily need su root. You could do it by executing sudo, for example.
sudo grants the user full root permissions for running a single command. If it's allowed by the configuration file /etc/sudoers, then
sudo useradd elmerfudd
will run with full root privileges only for that command. It's like an ultraconfigurable superflexible SETUID. Very very cool. ;)
errr, it turns out I was in root anyway... [i had to su to cp into usr/local]
got it!
i had to do
locate groupadd
/usr/sbin/groupadd mysql
.....
thanks!
I was wrong then hehe. I never used sudo myself, but yea.. I've heard that it's fully configurable.Quote:
Originally posted by sploo22
sudo grants the user full root permissions for running a single command. If it's allowed by the configuration file /etc/sudoers, then
sudo useradd elmerfudd
will run with full root privileges only for that command. It's like an ultraconfigurable superflexible SETUID. Very very cool. ;)
then your path is probably screwed up on ya... you shouldn't need to write out the path of /usr/sbin. try doing a groupadd by running "su -" to become root, or simply logging in as root at console.Quote:
Originally posted by toypiano
got it!
i had to do
locate groupadd
/usr/sbin/groupadd mysql
.....
thanks!
And the su manpage (man su) explains the difference between 'su' and 'su -'.
Useradd and groupadd command always need root access to execute it. In ubuntu, if you have should have sudo root access and then only you can add user or group in system.
To get sudo root access in ubuntu, we need to change the group of that user to sudo by some other account who have root access.
difference between su and su - is that -- if you do only su to login then that time login process will not call login scripts of that user. i.e. user will not run with all its default parameter or anyother extra settings. if you do su - then it will call login scripts and while logging in. and that will be better to avoid errors while running commands or scripts.
You will get detailed knowldge about this commands on below link :
http://roundoverlinux.blogspot.in/20...-examples.html
http://roundoverlinux.blogspot.in/20...-examples.html
http://roundoverlinux.blogspot.in/20...-examples.html