Programming :: Find Login User With The Largest Account?
Dec 13, 2010
I'm looking for a script that can do two things: (1) determine the shortname of the user with the largest account in /Users and (2) look up their full/long name. I'm going to use this script to help identify who the user on a computer and while I know that's possible that a sometime-user may have a larger account than the normal-user on any given computer, the results of a script should be sufficient in most cases for my needs.I'm not sure the best way to around this. I know that can use "du -m -d1 /Users" as root:
root on torchwood
[ ~ ]$ du -m -d1 /Users
I created an account using the following command:#useradd -g developers john and successfully changed the user password with:#passwd johnThe user is unable to login using the New Password using SSH. As a root I can login (#su - john) with no problem.
I am a new Linux user and have a question about the administrative authentication. When I am logged in as a user and I need to do something that requires root privileges the little password window comes up and I enter the root password. My question is how long are the root privileges granted for?I noticed that a few minutes after finishing checking out the firewall configuration tool and closing the window that I was still able to re-enter the fire wall tool and other administrative tools. How do I log out of the root privileges without logging out and then back into my account?
If I'm getting good at anything with Fedora, it would be making mistakes. I have Fedora 12 installed and it was running fine until I attempted to set the path in bashrc and cshrc for jdk. Now I am unable to login using the only user account I created at install. When I enter my password the login screens goes blank then my mouse pointer appears with the circling dashed loading symbol for a few secs and then brings me back to the login screen asking for my password again.
I recently made a computer for someone who decided to get a new one instead.. so i thought i'd make a server out of it lk i had it before. so i deleted their account (while on their account) and made me an account.. but now when i try to login to my account it's.. not there? such as when i type my username and pass it says i entered an invalid user/pass. any idea how i can get my user accounts back or atleast logon to this system? i know the root password if there's any way i can login under the root account.
Network server to administer accounts for all users, one login ie at login select or type in user name and password to login - so that I don't have to setup users separately on all PC's so that they can login from any computer.
Recently I deleted files from my root/share folder in an attempt to remove a program which had made the system virtually unusable. Upon reboot of the system I accessed the partition I had just edited and I found that I was unable to login using the login manager, every time I hit login it just returns me to the same screen displaying the message: unable to start session.
I want to create an unprivileged user account, say 'shutdown', which can be used only to shutdown the system. I followed the instructions in ut when I login into the system, I get this error 'Cannot execute /usr/bin/sudo /sbin/shutdown -h now: No such file or directory'.These are the configurations that I did
/etc/sudoers: Code: shutdown localhost=/sbin/shutdown -h now
Is there a non-root shell command that can tell me if a user's account is disabled or not? note that there is a fine distinction between LOCKING and DISABLED:
LOCKING is where you prepend ! or * or !! to the password field of the /etc/passwd file. On Linux systems that shadow the passwords, this marker flag may be placed in /etc/shadow instead of /etc/passwd. Password locking can be done (at a shell prompt) via password -l username (as root) to lock the account of username, and the use of the option -u will unlock it.
DISABLING an account is done by setting the expiration time of the user account to some point in the past. This can be done with chage -E 0 username, which sets the expiration date to 0 days after the Unix epoch. Setting it to -1 will disable the use of the expiration date.
The effect of locking to to prevent the login process from using a supplied password to hash correctly against the saved hash (by virtue of the fact that the pre-pended marker character(s) are not valid output character(s) for the hash, thus no possible input can ever be used to generate a hash that would match it). The effect of disabling is to prevent any process from using an account because the expiration date of the account has already passed.For my situation, the use of locking is not sufficient because a user might still be able to login, e.g. using ssh authentication tokens, and processes under that user can still spawn other processes. Thus, we have accounts that are enabled or disabled, not just locked. We already know how to disable and enable the account - it requires root access and the use of chage, as shown above.To repeat my question: is there a shell command which can be run without root privileges which can output the status of this account expiration info for a given user? this is intended for use on a Red Hat Enterprise 5.4 system.The output is being returned to a java process which can then parse the output as needed, or make use of the return code.
I have a problem with the Google search box top right corner in Konqueror, when entering search I recieve an error page "Unsupported Protocol" Google asks for ioslave or kioslave. Also when highlighting text on a page and right clicking with the mouse no search option is given. I created a new user and all works as it should for the new user. What is wrong with my user account? I have reset default values in Konqueror setup.
Apache is run as www as is all the files/folders. People are uploading via FTP, scp, so the problem is if I chmod so everyone can read, then rsync as a user it works until new files are added which then my ; if rsync fails with a permission denied. Now I can add a chmod in the script so everyone can read, but since www can already read, I figured I would just change my script to use www. I added the ssh key to his authorized_keys file, but when I try to just ssh in I see this in the secure file;
server sshd: User www not allowed because account is locked sshd: Failed none for invalid user www from ip port 54983 ssh2
Now I read a few places already saying I need to add a password to the account, etc. but before I jump and try all I read, 1st major one, will this now break apache? Will this affect any startup things, etc. and .... will that unlock that user for ssh in or is there another preferred method?
I just installed Fedora 12 on a laptop. I changed the default shell on the root account to /bin/tcsh and changed the runlevel to 3 and then rebooted. Now I can't login into the root account: it returns me immediately to the login prompt and I can't see any error message (the screen is cleared).Why is this happening?Can I boot into some sort of safe mode so I can undo my changes to the /etc/inittab and /etc/passwd file?I tried booting with a Live CD with the intention of mounting the filesystem and making the changes, but the new filesystem is a LVM and it won't let me mount it (or I don't know how to mount a Logical Volume).
I have a user account which is required to run as part of the operating system and as a service. I am currently attempting to install my companies software on an Ubuntu desktop via wine just for the purpose of finding out if it's do-able.
Is there a way, in Ubuntu, for a user account to be given the local rights assignment to act as part of the operating system and to function as a service in the background?
I recently installed likewise 6.0 on a Ubuntu 10.04 box and I was able to login as a Domain user. However my domain user account is not showing on the "User Settings" panel (I can only see locally created accounts). And if try to change login shell by typing "chsh", then it tells me user "DOMAINusername" does not exist in /etc/passwd.
I asked this question yesterday with Linux, but I realized I need to get it working in both Linux and OS X. Link to earlier question: Get folder with largest number at the end of the name in Linux. I have some folders r1, r2, r3, etc. and I want to get the name of the folder with the largest number at the end. How do I get the name? The ls -v solution looks promising, but I want to exclude all folders that don't follow the pattern r[0-9]*
My dns/firewall Debian7 server (no GUI) was installed with a LDAP client.This client is now useless as no user needs to connect to that machine, so I changed PAM configuration to remove LDAP users from local users.The problem is that I can't login anymore as root or as administration user.The password is unchanged and when I try to login with it it gaves no error, but go back instantly to "login :"On the other hand, when I try a wrong password, it react as it should with an authentication failure.That's why I don't think it's a password issue.
The server still works as far as I can say no service was impacted, I just can't login anymore (and that will be an issue when it comes to some upgrade or administration...).
I recently created a new user account in ubuntu linux, and created a file called xsession so that I can boot directly into xmbc when I log into that account. Is there anyway to delete the home folder for that account. I can view the file but when I try to delete it is says I do not have apporite permisions to delete the file.
I removed the account and deleted the group but it still shows up when I type in the address /home/xmbc
Is there anyway I can delete this file. It also will not let me create any new user accounts is there any way I can fix these prolbems without totaly reinstalling the system.
i cant log out of my user account without shutting down the computer, and no one else can either. computer can't be turned off unless i, (administrator)have logged out, this can't be a default setting surely.