root/admin commands in LINUX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers root/admin commands in LINUX
# 1  
Old 12-22-2005
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
# 2  
Old 12-22-2005
maybe your PATH is missing, look into /sbin or /usr/sbin
# 3  
Old 12-22-2005
Thank you

I found these commands in /usr/sbin, but how should I add them to the PATH?
# 4  
Old 12-22-2005
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  
Old 12-22-2005
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  
Old 12-22-2005
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 ?
# 7  
Old 12-26-2005
oh....Now I got it

Thank you
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Change "root" to "root.admin" in outgoing e-mails

Our AIX servers send e-mails which have the "from" address set to "root@company.com" for our root user ("C{M}company.com" in /etc/sendmail.cf). The problem is that when bad e-mails are sent out or rejected by remote servers, they are being returned and delivered to e-mail box of "Mary Root". ... (2 Replies)
Discussion started by: kah00na
2 Replies

2. What is on Your Mind?

Regarding Admin life either as DBA or UNIX Linux admin

I am planning to choose my career as Unix/Linux Admin or a DBA. But I have come to know from forums and few admins like the job will be 24/7. I have few questions on that. Can we get "DAY" shifts in any one of the admin Job ? Can't we have shift timings in any company ? Eventhough the... (7 Replies)
Discussion started by: Jacktts
7 Replies

3. Red Hat

I want to become a Linux admin..

Hi , I have skill set in unix/shell scripting. But I would like to become a linux admin..So could you please help on this.. 1) what are the things need to be learn, 2) any reference should be appreciable. 3) or any website.. THanks, Mani (2 Replies)
Discussion started by: Mani_apr08
2 Replies

4. Linux

Linux admin

Hi, Please give some important admin command document . which is helpful in my role. THanks, Mani (8 Replies)
Discussion started by: Mani_apr08
8 Replies

5. Gentoo

help|how to rest my password admin(root)

i have gentoo and i dont know what is my password user admin(root) how i can to rest my passord? thanks. (2 Replies)
Discussion started by: turivnkl
2 Replies

6. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

7. UNIX for Dummies Questions & Answers

Root admin info

(Very New to UNIX- Solaris world) I have my Solaris 10 system built, and can login using root. This root user is a super type of admin user as I understand it. 1.My question is do UNIX admins usually use this account for all admin tasks or do they use another account similar to this... (2 Replies)
Discussion started by: deedaz
2 Replies

8. HP-UX

Need HPUX admin commands lost

Hi All Please somebody send me list of admin commands used for HPUX. Thanks Sunanda (2 Replies)
Discussion started by: sunanda
2 Replies

9. UNIX for Dummies Questions & Answers

Name 10 commands every Linux and Unix admin should know

I'm working on further developing my Unix skills and I'm just curious what some of the experienced admins out there would consider to be 10 essential commands every admin should know. (12 Replies)
Discussion started by: Arkitech
12 Replies

10. OS X (Apple)

root/admin authorization and PackageMaker

I am building an installable package (.pkg) with PackageMaker 1.1.11 (that's the one that comes with Panther). The package is for installing things both to /Applications and to some folders in /Library (/Library/StartupItems and a new folder that I'm putting in /Library). I do (obviously) not... (4 Replies)
Discussion started by: ropers
4 Replies
Login or Register to Ask a Question