06-30-2008
Remove and block a user from Linux server
Hi,
Can anyone please guide me how can I remove/block a user from a server access.
/usr/sbin/adduser -d /home/john john
echo ****** | passwd --stdin john
I used the above command to add a user "john". How do I delete and block john.
Appreciate your responses.
Last edited by sureshcisco; 06-30-2008 at 10:30 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi, i am on aix. i used smitty to remove a user..
but then found that its directory still exists....
so i have to remove the directory manually...
am i doing it the right way? (2 Replies)
Discussion started by: yls177
2 Replies
2. Shell Programming and Scripting
Hi,
The Setup is like this. I'm connecting to Unix machine from my local machine. After connecting to Unix M/c, i need to connect FTP server. Am successful in connecting to FTP server, but am not able to download the file from the ftp server to my local machine. I have different user id's and... (1 Reply)
Discussion started by: ranjith_taurean
1 Replies
3. UNIX for Dummies Questions & Answers
Thanks
AVKlinux (3 Replies)
Discussion started by: avklinux
3 Replies
4. UNIX for Advanced & Expert Users
Hello! Can anyone please assist:
Question:
On Linux Server I have created two users John and Matt. I want to give both the users the ability to run 'more' and 'tail -f' commands on the log file in the directory /var/log/test.log. I do not want to give them SU rights.
Can any one please... (6 Replies)
Discussion started by: sureshcisco
6 Replies
5. AIX
Hi,
We have a requirement to do passwordless entry from one user to a different user on the same AIX server using ssh keys.
Can some one help me with this?
Thanks in advance,
Panditt (3 Replies)
Discussion started by: deshaipet
3 Replies
6. Shell Programming and Scripting
Can someone help in writing some script through which I can transfer file (scp) from root user in abc server to crt user in hfg server and can give the crt user password in script itself so that it doesn't prompt me every time for password (4 Replies)
Discussion started by: Moon1234
4 Replies
7. UNIX for Dummies Questions & Answers
Oracle Linux 6.6
grid user's secondary groups are asmadmin,asmdba,asmoper and dba
# id -a grid
uid=638(grid) gid=2000(oinstall) groups=2000(oinstall),2100(asmadmin),2200(dba),2300(asmdba),2301(asmoper)
I want to remove dba as the secondary group for grid and keep the remaining ones.
ie. I... (5 Replies)
Discussion started by: John K
5 Replies
8. Solaris
Based on the NIS migration tests I did and another question I posted earlier on.
https://www.unix.com/solaris/272021-solaris-8-md5-encryption-support.html
I tried to downgrade NIS linux encryption to DES to support solaris connection.
So I modified /etc/pam.d/system-auth as below,
password... (0 Replies)
Discussion started by: bestard
0 Replies
9. UNIX for Advanced & Expert Users
Hello,
i configured rhel linux 6 with AD directory to authorize windows users to connect on the system and it works.
i have accounts with high privileges (oracle for example) if an account is created on the AD server i would to block him.
I looked for how to do, for the moment all the... (3 Replies)
Discussion started by: vincenzo
3 Replies
10. UNIX for Beginners Questions & Answers
I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a variable I have declared in my main script in a remote shell I am running through ssh.
So I have a... (8 Replies)
Discussion started by: DJR
8 Replies
LEARN ABOUT OSF1
removeuser
removeuser(8) System Manager's Manual removeuser(8)
NAME
removeuser - Deletes user accounts interactively
SYNOPSIS
/usr/sbin/removeuser
DESCRIPTION
Security Note
If you have enhanced security installed on your system, you should use the dxaccounts command to remove users. See the Security manual and
the dxaccounts(8) reference page for more information.
The removeuser command is an interactive command for deleting user accounts from your system. It also gives the option of deleting the
user's home directory, files and mail. The command prompts you for specific information and informs you of its activity and error condi-
tions.
The removeuser command invokes /usr/sbin/userdel to delete the user account information from /etc/passwd and the hashed password database
(if present).
Only the superuser can execute this command.
The command performs the following tasks: Asks for a login name for the user to be deleted. Enter the login name. If this entry does not
exist in the /etc/passwd file, the command informs you of this and exits. If the entry does exist, the command continues. Displays the
entry for the user from the /etc/passwd file and asks if this is the entry you want to delete. If the answer to this query is no, the com-
mand indicates that the user was not deleted and then exits. If the answer to this query is yes, the command deletes the user's entry from
the /etc/passwd file and any occurrences of the user from the /etc/group file. It then states that the user was deleted. Searches several
administrative directories and files for occurrences of the user and informs you if they exist. If so, it suggests that you may want to
delete these occurrences when the command is finished. If no occurrences of the user are found in these directories and files, the command
indicates so. Asks if you want to delete the home directory, all subdirectories, and all mail files for the user. If the answer to this
query is no, the command indicates that the user's home directory was not deleted and then exits. If the answer to this query is yes, the
command continues.
As a precaution, the command reminds you that you should have backed up the files for the user before removing them if you do not
want to lose them. It then asks if you are sure that you want to delete the files for this user. If the answer to this query is
no, the command indicates that the user's home directory was not deleted and then exits. If the answer to this query is yes, the
command states that it is removing the user's home directory, its contents and the user's mail file. It then deletes these items.
At this point, the command ends.
NOTES
Users are advised to migrate to the /usr/sbin/userdel utility or the dxaccounts utility as this command may be removed in a future version
of the operating system.
EXAMPLES
Enter a login name to be removed or <Return> to exit: john This is the entry for (john) in the /etc/passwd file:
john:VSh6/xbMqPDcY:5006:15:sdf:/usr/users/john:
Is this the entry you want to delete (y/n)? y Working ... Entry for (john) removed. Searching relevant directories and files for (john)
... None found. Do you want to remove the home directory, all subdirectories, files, and mail for (john) (y/n)? y The files for (john)
will be lost if not backed up. Are you sure you want to remove these files (y/n)? y Deleting /usr/users/john Deleting
/usr/spool/mail/john
FILES
Specifies the command path Group file Password file
SEE ALSO
Commands: addgroup(8), adduser(8), dxaccounts(8), finger(1), mkpasswd(8), passwd(1), useradd(8), userdel(8), vipw(8)
Files: group(4), passwd(4)
removeuser(8)