![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Root admin info | deedaz | UNIX for Dummies Questions & Answers | 2 | 01-20-2008 04:38 AM |
| Need HPUX admin commands lost | sunanda | HP-UX | 2 | 05-09-2007 04:42 PM |
| Name 10 commands every Linux and Unix admin should know | Arkitech | UNIX for Dummies Questions & Answers | 12 | 11-10-2006 06:21 AM |
| Canīt issue commands as root | kik_xxx | SUN Solaris | 1 | 05-03-2005 06:42 PM |
| root/admin authorization and PackageMaker | ropers | OS X (Apple) | 4 | 03-03-2004 09:39 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
root/admin commands in LINUX
Hi
I am working on LINUX shell scripting. I have root privileges and I know some basic root/admin commands like user creation, modification and so on. Till last week i was able to create users but now i am not able to create users or groups. When I give the command i got an error as bash: useradd: command not found. when i searched in bin, I could not see any of the files like useradd or usermod or groupadd I think someone accidentally deleted these files. If so, is there any way that i can get them back........ Thanks in Advance naina |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
maybe your PATH is missing, look into /sbin or /usr/sbin
|
|
#3
|
|||
|
|||
|
Thank you
I found these commands in /usr/sbin, but how should I add them to the PATH? |
|
#4
|
|||
|
|||
|
try echo PATH first:
# echo $PATH then just export it: # export PATH=$PATH:/usr/sbin u should put it in your .profile or .bash_profile |
|
#5
|
|||
|
|||
|
Thank you
after exporting they are working fine......... now should I add it in /etc/profile file as there are no .profile or .bash_profile for root and i found these files user's home directory |
|
#6
|
||||
|
||||
|
NO.
Naina, adding it to /etc/profile is like giving access to all users to these commands inherently. Well its not that users cant add it themselves. But why would you want a regular user to run a useradd command ( he wouldnt be able to run it anyway unless he has root priveleges). But not only useradd, there are other commands in sbin dir which if possible should be hidden from a normal user. As I said earlier a normal user can always add the sbin to his directory, but if he wants to, let him do it, I suggest you should not do that for him. By adding it in /etc/profile you are doing that for him. Well that is my way of looking at it. I agree there is nothing that can stop this to be more secure, but when you know that the burglars can break the door and come in your house, you still latch the door in the night, right ?
__________________
War doesnt determine who is right, it determines who is left |
|
#7
|
|||
|
|||
|
oh....Now I got it
Thank you |
|||
| Google The UNIX and Linux Forums |