LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to create hidden account in centos (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-hidden-account-in-centos-941696/)

paruhang 04-25-2012 12:24 PM

how to create hidden account in centos
 
hi everybody,
iam using 32bit centos 6.2 on my machine, and i want to create hidden user 'test' , i mean to say while iam starting my centos at GUI mode, at that time that username 'test' should not appear at list of users, only i can use that username is command line. logging in through other username.

i have try this:

#useradd test
#passwd test
#passwd -l test

and i restart the system at that time username 'test' doen't appears but while iam trying to switch user test in command line such error occurs:
$su test
Password:
su: incorrect password

so i was not able to login. After that i know

passwd -l test = it locks the user 'test'
passwd -u test = it unlocks the user 'test'

can anybody guide me or suggest me how to create hidden account in my local machine, i'll be greatful and any kinds of ideas, suggestions and guidelines are welcome.

THANK YOU IN ADVANCE

frankbell 04-25-2012 08:48 PM

If you are using the GDM, you can configure it not to show user names at start up.

Here's a suggestion from eHow. I have no way of testing it as I do not use a GUI login manager: http://www.ehow.com/how_12047088_mak...den-linux.html

ulkoma 04-28-2012 08:13 AM

Use Users and Groups (AKA User Manager) to create a user named test make sure to tick Specify user ID manually and choose a number below 500 but make sure that it has not been used by an other process/system user
IMO UserID 350 is a good choice

paruhang 04-28-2012 06:25 PM

thank you,
frankbell and ulkoma for your reply. i have created a user 'fatty' giving uid 350 and it does not appears in login list. i can ssh using 'fatty' but when i try to halt, reboot or kill any process, such error occours.

[fatty@lalit ~]$ kill 2855
-bash: kill: (2855) - Operation not permitted

[fatty@lalit ~]$ reboot
reboot: Need to be root

[fatty@lalit ~]$ halt
halt: Need to be root

ani i guess and add user 'fatty' as a root group command.

#usermod -aG root fatty


[fatty@lalit ~]$ kill 2855
-bash: kill: (2855) - Operation not permitted

[fatty@lalit ~]$ reboot
reboot: Need to be root

[fatty@lalit ~]$ halt
halt: Need to be root

and try again, same error occours before i add fatty users in 'root' group. can anyone guide me, suggest me how to reboot,halt and kill the unwanted process of remote machine using hidden account. i'll be greatful. any kinds of ideas suggestions are welcome.

THANK YOU IN ADVANCE

btmiller 04-28-2012 06:27 PM

You're trying to have a non-root user do things that only root can do. Adding a user to the root group does not make the user equivalent to root (and is probably a bad idea, to boot). If you know the root password, you can always use tyhe su command to switch to root. Otherwise, read up on sudo and set the user up in sudoers to be able to execute the commands you want with root privileges.


All times are GMT -5. The time now is 07:58 AM.