LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices



Reply
 
Search this Thread
Old 03-10-2008, 09:39 AM   #1
vincicoda
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
Unhappy RHEL4 cannot add new user and cannot modify them too


Hi all, I'm using RHEL4 as server and i'm login as root on it, so my problem is that since 1 week, adding new user is imposible and it's the same history when i'm trying to modify the users that i've created before.I don't have any idea of what's happened! there's no error message when i'm doing these operations! need your help pls.
 
Old 03-11-2008, 01:18 AM   #2
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
Could explain more on the method you using to create the new user. Is it the GUI tool or the command line ?. I would also suggest you to check the imunity if the password and shadow files. You explanation of the issue does not provide actual details of the issue you facing ..better if you elaborate more.
 
Old 03-11-2008, 03:22 AM   #3
vincicoda
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Unhappy more explanation

thanx for ur reply, first i'm using GUI tool when i tryed to create the user (user management tool), but i've also tryed to use command line and it said to me :"unable to open password file". Things i'm sure is that there's another process using this file!! , then i tryed to shutdown my computer normally so that all process will be stoped well and truly but it couldn't, so i checked in etc/X11/gdm/gdm.conf to make sure that the command line which calls the shutdown process is not in comment(it was in comment and i reactivate it),then i check inside /sbin and usr/sbin, surprise! there's no shutdown , reboot, restart, poweroff command file anymore, disappeared!

So in another way, i can't add an user, i can't modify them, and i can't shutdown or restart my computer normally.

I think that this explanation could satisfy you mether, but if need more pls feel free to ask me cos i need your help!
 
Old 03-12-2008, 01:28 AM   #4
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
Hello Vinci.

It seems the system is bad shape. I would really suggest you to check it for any intrusion. Regarding adding a user you can try the manual method . I know its tedious but current situation need it. I would like to see the output of below commands :

#lsattr /etc/passwd

#ls -l /etc/passwd

#ls -l /usr/sbin/adduser /usr/sbin/useradd

Also do you have SeLinux enabled on this system. For adding a use manually you need to first modify the passwd file, then shadow, /etc/group. Then create a home dir under /home and change its Owner/Group to username. Copy files from /etc/skel ( all are .?? files ).
 
Old 03-12-2008, 07:11 AM   #5
vincicoda
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Unhappy

Hi mether,

This are the cmd line output:
---------------------------------------------------------------------------
[root@intranet ~]# lsattr /etc/passwd
-bash: lsattr: command not found
[root@intranet ~]# ls -l /etc/passwd
-rw-r--r-- 1 root root 4628 jan 16 07:34 /etc/passwd
[root@intranet ~]# ls -l /usr/sbin/adduser
lrwxrwxrwx 1 root root 7 avr 6 2006 /usr/sbin/adduser -> useradd
[root@intranet ~]# ls -l /usr/sbin/useradd
-rwxr-xr-x 1 root root 57532 nov 24 2004 /usr/sbin/useradd
[root@intranet ~]# [root@intranet ~]# lsattr /etc/passwd
---------------------------------------------------------------------------

I don't have any idea if SELinux is enable on the system or not

other info: i can't modify my rights with passwd and shadow files, I don't know why?

and when i go to /sbin, the files with the # sing is filled in red, it don't get what does it mean?:

[root@intranet sbin]# ls

adsl-start ifcfg #pam_timestamp_check
blockdev ipppstats #pwdb_chkpwd
getkey mount.smb #unix_chkpwd
grub-terminfo #netreport vgscan


I think that my server was burned by a hacker or sthing like that...i've already ran avast on it but nothing! thanx for the tips of the manual user creation but i think it's not the best solution for me, it's better to proceed with a new install cos time is money! anyway u can post ur help or other tips this is very helpfull for me.


B.Regards,

Vinci
 
Old 03-17-2008, 12:46 PM   #6
sixty_nine
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Rep: Reputation: 0
to know whether Selinux is enabled or not run the getenforce command.
If it says that Enforcing, then edit the /etc/sysconfig/selinux file and disable it.
 
Old 03-23-2008, 07:27 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
Quote:
Originally Posted by sixty_nine View Post
edit the /etc/sysconfig/selinux file and disable it.
If you think SELinux is causing problems then act on the cause instead of the symptoms. Look for SELinux warnings in syslog and audit.log, run them through audit2allow, review and set up your local policy. If unsure if it's SELinux post warning messages you think are related (between BB code tags) here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User has no right to modify ZFS dirs? kebabbert Solaris / OpenSolaris 2 07-04-2007 02:54 PM
Modify motd to reflect user name? Tux-Slack Linux - Newbie 7 06-06-2007 07:00 PM
Add GD Support to PHP5 on RHEL4 U4 SlaughterB Red Hat 0 11-12-2006 01:00 AM
Where do I add/delete/modify 'environment variables'? hello321_1999 Linux - Newbie 3 05-03-2006 12:41 PM
MySQL user accounts. How do I modify them? correro Linux - Software 3 03-15-2003 08:39 PM


All times are GMT -5. The time now is 09:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration